Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
cdrozdowski111
Posted - 07/25/2013 : 07:21:30 AM OriginPro 9.0.0 SR2 64-bit, Win7 64-bit, running in VMware Fusion 5.0.3
Let's say I have developed a LT script in Origin 9 but want it to be able to run the script in an earlier version of Origin. How can I test if a given X-Function exists in the earlier version?
For example, the "insert_graph_to_layer" X-Function was introduced in 9. What can I add to my script to make the script not stumble in Origin 8.x?
What would be the most elegant/classy way too?
1 L A T E S T R E P L I E S (Newest First)
greg
Posted - 07/25/2013 : 11:33:00 AM Script within braces runs in a new context - the same as script running in a called OGS. Errors within these new contexts do not stop a script (or even output an error message) they simply return.
You can use this information in the following way:
flag = 0; { insert_graph_to_layer; flag = 1; // If an error occurs, this never runs } if(flag == 1) continue; // No problem else { ty -a An Error has occurred.; // Uncomment following line to stop script completely // break; // or execute error handling which lets script continue // your handling here } ty -a Continuing ...;