Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Coordinates of workpoint using ilogic

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Ktelang
4795 Views, 2 Replies

Get Coordinates of workpoint using ilogic

Hello Everybody,

 

How to get coordinates of a workpoint using iLogic.

can anyone help me with this

 

Thanks

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
2 REPLIES 2
Message 2 of 3
Curtis_Waguespack
in reply to: Ktelang

Hi  Ktelang,

 

Here's a quick example for working with workpoints.

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument

Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim oWorkPoint As WorkPoint

'create a workpoint
oWorkPoint = oDoc.ComponentDefinition.WorkPoints.AddFixed(oTG.CreatePoint(1.123, 1.124, 1.125))
'display the new workpoint's coordinates
MessageBox.Show(oWorkPoint.Point.X  &", "&  oWorkPoint.Point.Y &", "&  oWorkPoint.Point.Z, "iLogic1")

'identify the first point in the workpoints collection aka the origin point
oWP = oDoc.ComponentDefinition.WorkPoints(1)
'display the first workpoint's coordinates
MessageBox.Show(oWP.Point.X  &", "&  oWP.Point.Y &", "&  oWP.Point.Z, "iLogic2")

'display a named workpoint's coordinates
oWP1 = oDoc.ComponentDefinition.WorkPoints("Work Point1")
'display the first workpoint's coordinates
MessageBox.Show(oWP1.Point.X  &", "&  oWP1.Point.Y &", "&  oWP1.Point.Z, "iLogic3")
Message 3 of 3
Ktelang
in reply to: Curtis_Waguespack

Thanks Curtis

It helped

 

 

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------

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

Post to forums  

Autodesk Design & Make Report