02-19-2020
06:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-19-2020
06:34 AM
I found "Vertices".. didnt know about that property.
This works for me:
Private Sub read_all_corner_ipt()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
Dim oCompDef As ComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
Dim oVert As Vertices
Set oVert = oCompDef.SurfaceBodies.Item(1).Vertices
sTxt = "x" & vbTab & vbTab & "y" & vbTab & vbTab & "z"
For Each Item In oVert
sTxt = sTxt & vbCr & Round(Item.Point.x, 2) & vbTab & vbTab & Round(Item.Point.y, 2) & vbTab & vbTab & Round(Item.Point.z, 2)
Next
MsgBox sTxt
End Sub
EDIT: Now it works for me