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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Scripting issues!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ISIT User

8 Posts

Posted - 08/27/2012 :  04:27:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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>];
};"

ISIT User

8 Posts

Posted - 08/27/2012 :  04:33:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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;
}
"
Go to Top of Page

ISIT User

8 Posts

Posted - 08/27/2012 :  05:37:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

ISIT User

8 Posts

Posted - 08/27/2012 :  06:18:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Nailed it!
Go to Top of Page

ISIT User

8 Posts

Posted - 08/27/2012 :  10:23:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

ISIT User

8 Posts

Posted - 08/28/2012 :  03:55:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Nailed that one, too.
Go to Top of Page

ISIT User

8 Posts

Posted - 08/28/2012 :  07:51:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
All done, thanks for reading anyway.

@Mods: Please feel free to delete this little monologue now.
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 08/28/2012 :  08:49:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ISIT User,

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

Greetz,
Sebbey
Go to Top of Page

ISIT User

8 Posts

Posted - 08/28/2012 :  09:05:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000