Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting co-ordinates of a Point

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
WHassan
686 Views, 2 Replies

Extracting co-ordinates of a Point

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

 

2 REPLIES 2
Message 2 of 3
ebachrach
in reply to: WHassan

Hi,

the function localx(origin) should give you the value you are looking for.

Elly


--
Autodesk
Elly Bachrach
ETO/CTO Solutions Designer
Intelligent Configuration Solutions
Mobile +1 (773) 401-6980
elly.bachrach@gmail.com

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Message 3 of 3
FarrenYoung
in reply to: WHassan

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.

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report