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

check if variable is defined

ptc-4652907
1-Visitor

check if variable is defined

Hi,

my problem sounds rather simple but still I do not a have a solution in Mathcad. In order to automate my Mathcad 14 sheets I would like to check if a variable is defined or not.

If the variable is defined (not red colored in Mathcad) this on should be used instead of an different.

Thanks

Holger

ACCEPTED SOLUTION

Accepted Solutions

7 REPLIES 7

Richard's post may be helpful.

http://communities.ptc.com/message/128347#128347

Regards

Andy

Hi Holger,

I was not able to view Richard's solution, since I cannot open .mcd files, only .mcdx. I was wondering if you could possible provide a screenshot of the solution?

Thanks

RichardJ
19-Tanzanite
(To:thilgendorf)

The solution is a hack job using scripted components to trap the error. Scripted components are not available in Prime though, so the solution does not apply. There is no way to trap an undefined variable error in Prime and handle it gracefully. Why do you need to do this though? The original poster wanted this because they were calling worksheets from other software via the automation interface. In MC14 (and MC15) there is then a very good reason why you would want to check whether or not a variable is defined, but in Prime it is not necessary to do so.

Hi Tyler,

Please find the contents of the Mathcad worksheet in attachment in PDF and XPS file formats and on screenshots below:

Pic_1.png

Pic_2.png

Pic_3.png

LucMeekes
23-Emerald III
(To:thilgendorf)

You wrote originally "In order to automate my Mathcad 14 sheets I would like..." So why can't you open .mcd files?

Luc,

The very first post in this thread belongs to Holger, not Tyler.

LucMeekes
23-Emerald III
(To:VladimirN)

You're right. Confusion on my part.

Announcements

Top Tags