12-20-2018
01:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-20-2018
01:20 PM
I see what you mean... try this...
Dim app As Inventor.Application = ThisApplication
Dim doc As Document = app.ActiveDocument
Dim compDef As PartComponentDefinition = doc.ComponentDefinition
Dim wp1 As WorkPoint = compDef.WorkPoints("Work Point1")
Dim ucs As UserCoordinateSystem = compDef.UserCoordinateSystems(1)
'copy workpoint so it can be manipulated
Dim testPoint As Point = wp1.Point.Copy
'get the transform matrix for ucs
Dim invertMatrix As Matrix = ucs.Transformation
'invert matrix to find origin
invertMatrix.Invert
'transform point by inverted matrix to get desired point
testPoint.TransformBy(invertMatrix)
'you won't need to convert from metric to imperial but i'm leaving that in for me =P
MessageBox.Show("X: " & testPoint.X / 2.54 & " Y: " & testPoint.Y / 2.54 & " Z: " & testPoint.Z / 2.54 , "Title")
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State
Custom Glyph Icon for iMates
Mass Override for Each Model State
Custom Glyph Icon for iMates