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
 Access different layers from command window

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
bur2000 Posted - 02/25/2014 : 10:20:57 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9

I want to place some text elements at the same scalar position in different layers. However, from the command window I can only access any element in the currently active layer:

Text1.x=100
Text2.x=100
#Command Error!


Is there any way to access a text object in layer 2 without having to activate it first?
5   L A T E S T    R E P L I E S    (Newest First)
Castiel Posted - 02/26/2014 : 10:18:10 AM
quote:
Originally posted by bur2000

I know what you mean and that normally you have to instantciate a text to access it. But when Layer 1 is active, the simple statement

Text1.x=200
works. But

[Graph1]1!Text1.x=200
does not work.

I guess it's just how Origin does it.



I did not realize that case. But it fails if the three objects are named "a", "a.x", "a.x.x", while gobject works. Anyway, who would name an object in that way....

©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦
bur2000 Posted - 02/26/2014 : 09:15:47 AM
I know what you mean and that normally you have to instantciate a text to access it. But when Layer 1 is active, the simple statement

Text1.x=200
works. But

[Graph1]1!Text1.x=200
does not work.

I guess it's just how Origin does it.
Castiel Posted - 02/26/2014 : 08:14:05 AM
quote:
Originally posted by bur2000

Thanks a lot.

It seems like
[Graph1]1!Text1.x=

doesn't work. I have to assign it to a variable first?



Such syntactic sugar of course tastes good. But right now, think about an object's name that consists of a dot, say, "Text1.x". How can one tell you expect the property "x" of "Text1", or just the object "Text1.x"?
On the other hand, you make me think of the with...end with statement in other programming language, i.e.

with object
    .property1 = p1
    .property2 = p2
    ....
end with


©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦
bur2000 Posted - 02/26/2014 : 07:21:40 AM
Thanks a lot.

It seems like
[Graph1]1!Text1.x=

doesn't work. I have to assign it to a variable first?
Castiel Posted - 02/25/2014 : 10:55:54 AM
It's gobject.For example,
gobject go1=[graph1]1!text1;
gobject go2=[graph1]2!text2;
go1.x=100;
go2.x=100;


©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

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