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
 Origin Forum
 Using worksheet name as graph name

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
Viswanath14 Posted - 05/16/2015 : 09:38:11 AM
Hi,

I'm trying to create a graph with line plot of the data taken from worksheet. I have a large number of worksheets and the same procedure will be repeated over all of them to create a corresponding graph for each one of the worksheets. Is it possible to name the graph automatically with the corresponding worksheet name instead of names like 'Graph 10', 'Graph 11'?

Thank you,
Viswanath.

Origin Ver. and Service Release (Select Help-->About Origin):
OriginPro 9.0.0 (64-bit) SR2
Operating System: Windows 8.1
5   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 02/04/2016 : 4:49:44 PM
doc -e p {
range -wy rr1 = 1; // Y of first plot in layer
range rr2 = rr1.GetLayer()$;
win -r %H %(rr2.Name$);
}
vancity Posted - 02/04/2016 : 4:17:51 PM
For graphs already existed, the new feature wont work.


quote:
Originally posted by snowli

Just FYI: Origin 2016 supports set graph short name or long name to be book/sheet/column name, etc.

Here is a video for this:
http://originlab.com/index.aspx?go=support/videotutorials&pid=3190

See release notes about this: https://originlab.jira.com/wiki/x/ZIDnAw


When save graph template, preset graph short name or long name. Then when using it to plot new data, graph name will be preset.

Or after plotting one graph, when doing batch plotting of other data, you can set the graph short name or long name.


Thanks, Snow

snowli Posted - 02/03/2016 : 2:36:21 PM
Just FYI: Origin 2016 supports set graph short name or long name to be book/sheet/column name, etc.

Here is a video for this:
http://originlab.com/index.aspx?go=support/videotutorials&pid=3190

See release notes about this: https://originlab.jira.com/wiki/x/ZIDnAw


When save graph template, preset graph short name or long name. Then when using it to plot new data, graph name will be preset.

Or after plotting one graph, when doing batch plotting of other data, you can set the graph short name or long name.


Thanks, Snow
vancity Posted - 02/03/2016 : 1:55:15 PM
It did not work well. As the "graph1" becomes to "sheetname1".

If graph1 is coming from Workbook "W345" and graph2 is coming frang workbook "C435", how can the script loop all the graph window and change with the name of workbook associated with the graph?

I tried this but did not work either

doc -e p
{
page.active=1;

page.label$=%(1Y,@WS);
;

}





quote:
Originally posted by jasonzhao

Hello,

Please try the script below:


// change the name of the graph window into new name.
i=1;
doc -e p {
win -r %H "SheetName$(i)";
i++;
}

Also refer to this link for help:
http://www.originlab.com/doc/LabTalk/ref/Window-cmd#-r.3B_Rename_windowName_with_the_given_newName

Best regards!
Jason
OriginLab Technical Service




jasonzhao Posted - 05/17/2015 : 10:49:33 PM
Hello,

Please try the script below:


// change the name of the graph window into new name.
i=1;
doc -e p {
win -r %H "SheetName$(i)";
i++;
}

Also refer to this link for help:
http://www.originlab.com/doc/LabTalk/ref/Window-cmd#-r.3B_Rename_windowName_with_the_given_newName

Best regards!
Jason
OriginLab Technical Service



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