Hallo,
das hat PaulSchuepbach auf eine andere Frage geantwortet.
hab das gleiche gesucht!
#########################################################
Public Sub getBoundingBox()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oCD As SheetMetalComponentDefinition
Set oCD = oDoc.ComponentDefinition
Dim oFP As FlatPattern
Set oFP = oCD.FlatPattern
Dim dimX, dimY, dimZ As Double
On Error Resume Next
dimX = Round((oFP.Body.RangeBox.MaxPoint.X - oFP.Body.RangeBox.MinPoint.X) * 10, 3)
If Err Then
MsgBox "Abwicklung fehlt!", 16, "Error"
End
End If
dimY = Round((oFP.Body.RangeBox.MaxPoint.Y - oFP.Body.RangeBox.MinPoint.Y) * 10, 3)
dimZ = Round((oFP.Body.RangeBox.MaxPoint.Z - oFP.Body.RangeBox.MinPoint.Z) * 10, 3)
MsgBox ("X= " & dimX & " mm" _
& Chr(10) & "Y= " & dimY & " mm" _
& Chr(10) & "Z= " & dimZ & " mm")
End Sub
###########################################################
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP