Private Sub Form_Load()
Dim objApp As SolidEdgeFrameWork.Application
Dim objDoc As SolidEdgeAssembly.AssemblyDocument
Dim objAxialRel As SolidEdgeAssembly.AxialRelation3d
' 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 particular AxialRelation from the collection
Set objAxialRel = objDoc.Relations3d.Item(2)
'Get the Suppress state of the AxialRelation
bSuppress = objAxialRel.Suppress
'Change the Suppress state
objAxialRel.Suppress = Not bSuppress
' Release objects
Set objApp = Nothing
Set objDoc = Nothing
Set objAxialRel = Nothing
End Sub