Private Sub Form_Load()
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgeAssembly.AssemblyDocument
Dim objPointRel As SolidEdgeAssembly.PointRelation3d
' Local variables to be declared here
Dim bSuppress As Boolean
Const TESTFILE = "T:\vbtests\testcases\Sample.asm"
' Create/get the application with specific settings
On Error Resume Next
Set objApp = GetObject(, "SolidEdge.Application")
If Err Then
Err.Clear
Set objApp = CreateObject("SolidEdge.Application")
Set objDoc = objApp.Documents.Add("SolidEdge.AssemblyDocument")
objApp.Visible = True
Else
Set objDoc = objApp.ActiveDocument
End If
On Error GoTo 0
'Open an existing assembly document
Set objDoc = objApp.Documents.Open(TESTFILE)
'Get a PointRrelation object
Set objPointRel = objDoc.Relations3d.Item(9)
'Get the Suppress state of the PointRelation
bSuppress = objPointRel.Suppress
'Change the Suppress state
objPointRel.Suppress = Not bSuppress
' Release objects
Set objApp = Nothing
Set objDoc = Nothing
Set objPointRel = Nothing
End Sub