Author |
Topic  |
|
ISIT User
8 Posts |
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>]; };"
|
|
ISIT User
8 Posts |
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; } " |
 |
|
ISIT User
8 Posts |
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
8 Posts |
Posted - 08/27/2012 : 06:18:57 AM
|
Nailed it! |
 |
|
ISIT User
8 Posts |
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
8 Posts |
Posted - 08/28/2012 : 03:55:52 AM
|
Nailed that one, too. |
 |
|
ISIT User
8 Posts |
Posted - 08/28/2012 : 07:51:02 AM
|
All done, thanks for reading anyway.
@Mods: Please feel free to delete this little monologue now. |
 |
|
sebbey
Germany
70 Posts |
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
8 Posts |
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. |
 |
|
|
Topic  |
|