cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Assigning Units to functions in C

ptc-4441233
1-Visitor

Assigning Units to functions in C

Hi Community,

thanks again on the help on my last question, now as the programming of my dll has advanced and is finished, there is a new thing I have a question on.

In Mathcad I can work quite well with Units and Unit convertion, my question regards that topic, the stuff i found so far in the forum wasn't quite helpful on that issue.

So to break it down to a simple example lets take the example multiply, which is provided with mathcad.

If I type just the name of the function somewhere on an empty worksheet and a equal sign it will look like on the picture, giving me a idea which unit are demanded by the function.

function.PNG

My question is, if there is a way to teach mathcad that the input already has units, and if mathcad is able to return the result in a certain unit. But not in mathcad itself, I want to do that in my Visual Studio Project, means I would need some C code fragments or some command.

Thanks in advance for your replies!

Regards David

4 REPLIES 4

Hello!

Please attach to the message your Mathcad worksheet (select "Use advanced editor").

Hi Valdimir,

Thanks for your reply!

I think it will not be of any help to have the worksheet as my question regards C Code, but here you go.

Still I think you would need the dll as well as it is a user defined function to make it work.

Regards

We have had this problem when we were created the DLL in WaterSteamPro (www.wsp.ru) project.

Our solution - using one special sheet with name watersteamepro.xmdc and the reference on this sheet from each new sheet:

See the begin of this sheet:

wsp.PNG

Hi Valery,

thanks for that hint, but still thats some kind of workaround, did you check when programming this, with the ptc technical support if there is a solution other than this?

Thanks in Advance,

David

Announcements

Top Tags