Solid Edge How to get assembly reference plane object name?

2023-10-27T01:40:02Z
SE_BETA SE_TSS DOC_MANAGEMENT 3D-SKETCH TECH_PUB ASSEMBLY APPLICATION PART/SHEETMETAL TRANSLATORS DRAFT SETUP

Summary


Details

How to get assembly reference plane object name?

Solution

Below 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

--------------------------------------------------------------------------------------------

KB Article ID# PL8755881

Contents

SummaryDetails

Associated Components

SE_BETA