Community
Hello Everybody,
How to get coordinates of a workpoint using iLogic.
can anyone help me with this
Thanks
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
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")
Thanks Curtis
It helped