Autodesk Inventor Engineer-to-Order
- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Extracting co-ordinat es of a Point
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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 + {{ _
"
rigin", 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.
Re: Extracting co-ordinat es of a Point
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
the function localx(origin) should give you the value you are looking for.
Elly
--
Autodesk
Elly Bachrach
Solutions Architect
Autodesk Global Services
Direct +1 (847) 676-2880
elly.bachrach@autodesk.com
Re: Extracting co-ordinat es of a Point
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.
************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************

