Imports System.IO
Imports System.Runtime.InteropServices
Module Example
<STAThread()> _
Sub Main()
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
Dim objFamilyMembers As SolidEdgePart.FamilyMembers = Nothing
Dim objFamilyMember As SolidEdgePart.FamilyMember = Nothing
Try
OleMessageFilter.Register()
' Connect to Solid Edge
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objApplication.Visible = True
objPartDocument = objApplication.ActiveDocument
objFamilyMembers = objPartDocument.FamilyMembers
' Loop through famliy members.
For Each objFamilyMember In objFamilyMembers
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module