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
 replace text objects in both layers of the graph

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
ytyyutianyun Posted - 02/14/2014 : 8:25:53 PM
Origin Ver. 8.6 and Service Release 3(Select Help-->About Origin):
Operating System: windows 7

I use the code:
doc -e P {
TEXT.TEXT$ = "x/L=1 v=1m/s";
}


It only replace the text in the 1st layer of the graph. How can I replace the text in the 2nd layer of the graph. Thanks





2   L A T E S T    R E P L I E S    (Newest First)
ytyyutianyun Posted - 02/17/2014 : 8:37:49 PM
quote:
Originally posted by lkb0221

Hi,

That is because these two text objects are in the different layers and both name is "text".
"doc -e P" loop is just activate graph windows and run the script, it will not operate in each of the graph layers automatically.

So you can use "page.active" to switch layers and run "text.text$" again during each loop.
Or, use "doc -e LP" to replace "doc -e P". This will execute the script for all layers in all graph windows and Layout windows (only) in the project.

Zheng
OriginLab



Thanks, both solutions are well and solve my question, Thanks.
lkb0221 Posted - 02/17/2014 : 09:45:54 AM
Hi,

That is because these two text objects are in the different layers and both name is "text".
"doc -e P" loop is just activate graph windows and run the script, it will not operate in each of the graph layers automatically.

So you can use "page.active" to switch layers and run "text.text$" again during each loop.
Or, use "doc -e LP" to replace "doc -e P". This will execute the script for all layers in all graph windows and Layout windows (only) in the project.

Zheng
OriginLab

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