I want to combine a macro to turn on and off the system option ''Enable Selection through transparency''.
I can record how to trun the system on and record an other to turn it off,
but I want a sort of if command, when it is on turn it off when it is on turn it off, Just one Button
can someone help me with this?
Macro ''Enable Selection through transparency'' off:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swEdgesDefaultBulkSelection, True
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swDisplayEnableSelectionThroughTransparency, False
End Sub
Macro ''Enable Selection through transparency'' on:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swEdgesDefaultBulkSelection, True
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swDisplayEnableSelectionThroughTransparency, True
End Sub
See attached.