Hello all,
I am trying to get the X-coordinate of a point.
The code goes something like this;
Rule lstStdPanelParameters As List
Dim counter1 AsInteger
For counter1 = 1 To intNoStdPanels
lstStdPanelParameters = lstStdPanelParameters + {{ _
":origin", Point(counter1 * numStdPanelLength,0,0), _
":xDirection", Vector(0, 0, 1)), _
":yDirection", Vector(-1,0,0)}}
Next
End Rule
The value I need in a spearate rule would be something like;
Rule pntFirstPanelOrigin As Point = Second( First _
( lstStdPanelParameters))
Rule intOriginX As Number = pntFirstPanelOrigin.x
I get an error when I evaluate this (last) rule, saying "Found a Point, where a Part was expected"
I also get the same error if I use a child (for example)
Rule intOrigin2X As Number = myChildName.origin.x
Support for all the helpers is approaciated.
Thanking you,
Wajih
Solved! Go to Solution.
Solved by FarrenYoung. Go to Solution.
Solved by ebachrach. Go to Solution.
Hi,
the function localx(origin) should give you the value you are looking for.
Elly
There are also hidden functions GetX(), GetY(), and GetZ() which you might find useful. I believe localX() will convert the point relative to a coordinate system and GetX() will get the x value and not do any conversion. Someone can correct me if i'm wrong.