How to get assembly reference plane object name?
SolutionBelow code helps, when user try to run code on assembly document.
--------------------------------------------------------------------------------------------
Dim application As SolidEdgeFramework.Application = Nothing
Dim assemblydocument As SolidEdge.Assembly.Interop.AssemblyDocument = Nothing
Dim occurrences As SolidEdge.Assembly.Interop.Occurrences = Nothing
Dim occurrence As SolidEdge.Assembly.Interop.Occurrence = Nothing
Dim suppcomp As SolidEdge.Assembly.Interop.SuppressComponent = Nothing
Dim AsmRefPlane As SolidEdge.Assembly.Interop.AsmRefPlane = Nothing
Dim AsmRefPlanes As SolidEdge.Assembly.Interop.AsmRefPlanes = Nothing
Try
application = DirectCast(Marshal.GetActiveObject("solidedge.application"), SolidEdgeFramework.Application)
assemblydocument = CType(application.ActiveDocument, SolidEdge.Assembly.Interop.AssemblyDocument)
AsmRefPlanes = assemblydocument.AsmRefPlanes
Dim count As Integer = AsmRefPlanes.Count.ToString()
Console.WriteLine(count)
For i As Integer = 1 To AsmRefPlanes.Count
If AsmRefPlanes.Item(i).Global Then
Console.WriteLine(AsmRefPlanes.Item(i).Name.ToString())
End If
Next
Catch ex As System.Exception
Console.WriteLine(ex)
Finally
Console.WriteLine("plms")
End Try
--------------------------------------------------------------------------------------------