rgrayclamps
Mechanical
- Aug 6, 2004
- 376
Hi, all API masters:
I recorded the following macro to use "Unsuppress with Dependents" to unsuppress all components in an active assembly. But when I tried to run it, it did not work. It appears that the problem is due to "Part.EditUnsuppressDependent" statement.
Do you guys have the same experience? Do you have any workaround? I want to do one-click to unsuppress all components in an active assembly.
Thanks,
Alex
SW 2006 sp3.4
Win XP 2.0sp
' ******************************************************************************
' C:\DOCUME~1\achen\LOCALS~1\Temp\swx1548\Macro1.swb - macro recorded on 05/11/06 by ACHEN
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("A-00000620.SLDASM", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
Part.EditUnsuppressDependent
Part.ClearSelection2 True
End Sub
I recorded the following macro to use "Unsuppress with Dependents" to unsuppress all components in an active assembly. But when I tried to run it, it did not work. It appears that the problem is due to "Part.EditUnsuppressDependent" statement.
Do you guys have the same experience? Do you have any workaround? I want to do one-click to unsuppress all components in an active assembly.
Thanks,
Alex
SW 2006 sp3.4
Win XP 2.0sp
' ******************************************************************************
' C:\DOCUME~1\achen\LOCALS~1\Temp\swx1548\Macro1.swb - macro recorded on 05/11/06 by ACHEN
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("A-00000620.SLDASM", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
Part.EditUnsuppressDependent
Part.ClearSelection2 True
End Sub