Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
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....
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