02-11-2021
12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-11-2021
12:40 PM
you can get workpoint coordinates acc. to UCS like this.
Dim doc As PartDocument = ThisDoc.Document Dim partDef As PartComponentDefinition = doc.ComponentDefinition Dim workpoint As WorkPoint = partDef.WorkPoints.Item(1) Dim point As Point = workpoint.Point MsgBox(String.Format("WorkPoint: {0}x{1}x{2}", point.X, point.Y, point.Z)) Dim yourUCS As UserCoordinateSystem = partDef.UserCoordinateSystems.Item(1) Dim yourUCSmat As Matrix = yourUCS.Transformation point.TransformBy(yourUCSmat) MsgBox(String.Format("WorkPoint acc. to UCS: {0}x{1}x{2} (Dimensions in cm)", point.X, point.Y, point.Z))
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com