Author |
Topic |
|
Davek
USA
6 Posts |
Posted - 06/04/2014 : 1:05:18 PM
|
Origin Ver. 9.1 and Service Release 237 The following script works from the script window but not when executed from code builder, addionally the list window needs to be refreshed twice to show the ranges when executed from the script window. Is it me or is it a bug, thanks Dave
P1$ = J2814270; L1$= "Label"+P1.mid(6,3)$; C1$=P1.mid(4,1)$; range r1=P1$;
P2$ = J2814271; L2$= "Label"+P2.mid(6,3)$; C2$=P2.mid(4,1)$; range r2=P2$;
P3$ = J2814272; L3$= "Label"+P3.mid(6,3)$; C3$=P3.mid(4,1)$; range r3=P3$;
P4$ = J2814273; L4$= "Label"+P4.mid(6,3)$; C4$=P4.mid(4,1)$; range r4=P4$;
P5$ = J2814350; L5$= "Label"+P5.mid(6,3)$; C5$=P5.mid(4,1)$; range r5=P5$;
P6$ = J2814351; L6$= "Label"+P6.mid(6,3)$; C6$=P6.mid(4,1)$; range r6=P6$;
P7$ = J2814353; L7$= "Label"+P7.mid(6,3)$; C7$=P7.mid(4,1)$; range r7=P7$;
P8$ = J2814365; L8$= "Label"+P8.mid(6,3)$; C8$=P8.mid(4,1)$; range r8=P8$; |
|
lkb0221
China
497 Posts |
Posted - 06/04/2014 : 2:03:37 PM
|
Hi, Dave
What do you mean not working in code builder? Any error messages? What does your script do anyway? It seems just some variable declaration...
Zheng OriginLab |
|
|
greg
USA
1378 Posts |
Posted - 06/06/2014 : 09:27:10 AM
|
I don't know what you mean by "list window", so the only thing I can offer is that Code Builder has it's own scope, so declared variables (like your ranges) will be out of scope immediately after you execute your snippet in Code Builder. Those assigned without declaration (those strings) are global in scope and will persist. Once you execute in the script window, then the ranges persist. If you again execute in Code Builder, those ranges will have the same names and values as the ones declared in the Script Window, but they too will disappear after Code Builder finishes. |
Edited by - greg on 06/06/2014 09:32:52 AM |
|
|
|
Topic |
|
|
|