Welcome Guest Search | Active Topics | Log In | Register

XMCD file
TheWizEd Offline
#1 Posted : Thursday, July 29, 2010 9:36:52 PM(UTC)
Rank: Advanced Member

Groups: Registered

Joined: 7/4/2010(UTC)
Posts: 51
Location: Hercules, Ca. USA
Andrey,

I'm not sure if your intention is to make SMath files compatable with MathCAD through the xmcd export feature. I know it may be difficult to translate programs and if block because there is a significant difference between the way SMath and MathCAD implement these.

But I tried to import a MathCAD file with subscripts and there appears to be a difference in how they are writen in xmcd form. A simple change in format will improve portability.

SMath

<ml:id xml:space="preserve">a.1</ml:id>

MathCAD

<ml:id xml:space="preserve" subscript="1">a</ml:id>

Also I noticed that a value with units of ft is written by SMath and MathCAD as:

Code:

        <ml:define>
          <ml:id xml:space="preserve">a</ml:id>
          <ml:apply>
            <ml:mult />
            <ml:real>1</ml:real>
            <ml:id xml:space="preserve">ft</ml:id>
          </ml:apply>
        </ml:define>


Which doesn't readback as units of ft but variable ft.

Code:

        <ml:define>
          <ml:id xml:space="preserve">a</ml:id>
          <ml:apply>
            <ml:mult />
            <ml:real>1</ml:real>
            <ml:id xml:space="preserve">'ft</ml:id>
          </ml:apply>
        </ml:define>


With 'ft it is recognized by SMath as units ft

Perhaps the xmcd engine can see if ft is a unit or a variable.
smath Offline
#2 Posted : Thursday, July 29, 2010 10:01:01 PM(UTC)
Rank: Administration

Groups: Administrators

Joined: 7/11/2008(UTC)
Posts: 476
Location: St. Petersburg
Yes, this is well known thing. It is because xmcd files don't have any indication for the variables to check if the variable is a unit or not. On xmcd file open Mathcad just sees if the name of variable is exist in the built-in list of units and do not redefined by user - then it is a unit.

Regards.
smath Offline
#3 Posted : Thursday, August 26, 2010 12:11:30 AM(UTC)
Rank: Administration

Groups: Administrators

Joined: 7/11/2008(UTC)
Posts: 476
Location: St. Petersburg
Units issue fixed.

Changes:
  • SMath Studio now checks if it has built-in units with the specified in the xmcd-file names and checks if user didn't redefine them above. If so, then program will change type of the operand from Variable to Unit. Works like a charm Good
  • Also added ability to parse expressions with manually specified Units of the answer.


XMCDFileType.1_2_1.Plugin.Bin.zip (Date: 26.08.2010. File size: 16.61KB) - * To copy .dll file from archive to the "plugins" folder of SMath Studio installation directory.

Best regards, Andrey Ivashov.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.