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 objAttachedPropertyTables As SolidEdgePart.AttachedPropertyTables = Nothing
Dim objAttachedPropertyTable As SolidEdgePart.AttachedPropertyTable = Nothing
Try
OleMessageFilter.Register()
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objPartDocument = objApplication.ActiveDocument
objAttachedPropertyTables = objPartDocument.AttachedPropertyTables
If objAttachedPropertyTables.Count > 0 Then
objAttachedPropertyTable = objAttachedPropertyTables.Item(1)
End If
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module