Hello!
I added to the sample of the code above the angle measurements to the original axes, eges naming and identify the start/end point.
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Dim oDocDef As PartComponentDefinition = oDoc.ComponentDefinition
Dim oEdge As Edge
Dim oEdgeLengths As New List(Of Double)
Dim oMin, oMax, oLength As Double
Dim oBody As SurfaceBody = oDocDef.SurfaceBodies.Item(1)
Dim i As Integer = 1
For Each oEdge In oBody.Edges
oEdge.Evaluator.GetParamExtents(oMin, oMax)
oEdge.Evaluator.GetLengthAtParam(oMin, oMax, oLength)
oEdgeLengths.Add(Round(oLength, 6))
Next
For Each oEdge In oBody.Edges
oEdge.Evaluator.GetParamExtents(oMin, oMax)
oEdge.Evaluator.GetLengthAtParam(oMin, oMax, oLength)
If Round(oLength, 6) = oEdgeLengths.Max Then
MessageBox.Show("The longest edge =" & oLength & "cm", oBody.Name)
Try
oNames = iLogicVb.Automation.GetNamedEntities(oDoc)
oNames.SetName(oEdge, "LongestEdge" & i)
oNames.SetName(oEdge.StartVertex, "StartPoint" & i)
oNames.SetName(oEdge.StopVertex, "EndPoint" & i)
i = i + 1
angleX = Measure.Angle("LongestEdge" & i, "X Axis")
angleY = Measure.Angle("LongestEdge" & i, "Y Axis")
angleZ = Measure.Angle("LongestEdge" & i, "Z Axis")
Dim Text1 As String = "Angle bettwen Endge and X Axis =" & angleX & " deg;"
Dim Text2 As String = "Angle bettwen Endge and Y Axis =" & angleY & " deg;"
Dim Text3 As String = "Angle bettwen Endge and Z Axis =" & angleZ & " deg."
MessageBox.Show(Text1 & vbLf & Text2 & vbLf & Text3, "Title")
Catch
End Try
End If
Next