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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

"on error" function does not work if variable is n

NicL
1-Newbie

"on error" function does not work if variable is n

Hi! I'm writing some MathCAD 14 worksheets that are ActiveX friendly and can be used with my LabVIEW program. I'm trying to add some flexibility to the worksheet, so that an end-user can use the worksheet as is and I can consume data from using LabVIEW as well. From LabVIEW I'm passing my data to a 2d matrix I call "LV_InArray" in my worksheet. If LabVIEW is not using the worksheet, then LV_InArray results in an error ("This variable is undefined.". I want my worksheet to work if the user is using it directly in MathCAD, and it to work if LabVIEW is using it through ActiveX. Surely there is a way to detect if LabVIEW is using the worksheet or not and set variables appropriately. Attached is what I have tried. As you can see, "on error" does not appear to resolve that LV_InArray is not present (and therefore errors) and the 3x3 matrix is not being taken instead of the erroneous LV_InArray variable. What is going on here? How can I catch an error the way I want to?
3 REPLIES 3
NicL
1-Newbie
(To:NicL)

Bump. Hmmmm... this forum seems really dead. Does anyone know of a MathCAD forum that has more users I can try to ask questions to? Also, are there any plans at all for a new version of MathCAD? Seems like development has come to a stop.
RichardJ
19-Tanzanite
(To:NicL)

Yes, for several reasons this forum is a rather dead backwater. All the real action is here: http://collab.mathsoft.com/~mathcad2000 Once you have logged in, go to this thread: http://collab.mathsoft.com/read?80805,63e#80805 It explains how to trap undefined variables (it's a kludge, but it works). Richard
S00tt
1-Newbie
(To:NicL)
Top Tags