The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Scripting issues!

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ISIT User Posted - 08/27/2012 : 04:27:39 AM
Could anyone tell me why Origin would refuse to execute this order?

"for(ii = 92 ; ii = 103 ; ii++)
{
plotxy iy:=(U1[ii],P[ii]) plot:=203 ogl:=[<new template:=doubleY>];
};"

8   L A T E S T    R E P L I E S    (Newest First)
ISIT User Posted - 08/28/2012 : 09:05:35 AM
I wrote/developed/copypasta'd this little script to create a certain type of graph (Double Y) from a chosen number of rows in the designated columns (here col(1), col(24) and col(25)).

"[plot]

def Graph
{

string Book1$ = page.name$;
string Sheet1$ = layer.name$;
plotxy iy:=(1,24[%1]:24[%2]) plot:=203 ogl:=[<new template:=doubleY>];
plotxy iy:=[Book1$]Sheet1$!(1,25[%1]:25[%2]) plot:=203 ogl:=2;

};"

I was unable execute the defined macro because I had saved it in the wrong file (all computers connected via one network but because the different computers use different versions of Origin there are multiple userfiles). After saving the OGS file containing the script in the userfile belonging to my computer the whole
"run.section(Graph,plot)
Graph (argument1 argument2)"
thing worked properly.

Amen.
sebbey Posted - 08/28/2012 : 08:49:28 AM
Hi ISIT User,

maybe you feel like sharing your solution, since it could still help somebody else. Just an idea;)

Greetz,
Sebbey
ISIT User Posted - 08/28/2012 : 07:51:02 AM
All done, thanks for reading anyway.

@Mods: Please feel free to delete this little monologue now.
ISIT User Posted - 08/28/2012 : 03:55:52 AM
Nailed that one, too.
ISIT User Posted - 08/27/2012 : 10:23:44 AM
Don't mean to be rude, but...

"[plot]

def Capacity_Graph
{

string Book1$ = page.name$;
string Sheet1$ = layer.name$;
plotxy iy:=(1,24[%1]:24[%2]) plot:=203 ogl:=[<new template:=doubleY>];
plotxy iy:=[Book1$]Sheet1$!(1,25[%1]:25[%2]) plot:=203 ogl:=2;

};"


This macro works. What doesn't work is executing it via "run.section(xy,plot, [arguments])"...ideas?
ISIT User Posted - 08/27/2012 : 06:18:57 AM
Nailed it!
ISIT User Posted - 08/27/2012 : 05:37:00 AM
Ok I figured that using the column nuber instead of the column name works but that still doesnT solve the problem with the second part of the script.

Why would Origin execute the first x-function properly and then complain about the "iy" in the second one?
ISIT User Posted - 08/27/2012 : 04:33:18 AM
And while you're at it...what's wrong with this little bugger?

"[plot]

def Graph
{
for(ii = %1 ; ii = %2 ; ii++)
{

plotxy iy:=(U1[ii],P[ii]) plot:=203 ogl:=[<new template:=doubleY>];
plotxy iy:=[bookn$]sheetn$!(U1[ii],Q[ii]) plot:=203 ogl:=2;
}
"

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000