Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

toggle 'enable selection through transparency'

Status
Not open for further replies.

innov

Industrial
Joined
Sep 9, 2005
Messages
36
Location
US
I'm looking for a way to add a tolbar shortcut to toggle 'enable selection through transparency' on and off.

what's the best way of going about this?
thanks!
 
Record a macro, then assign a button or hotkey to it.

See the SW Help index for macro


[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
Assign this macro to a toolbar button
Code:
Sub Main()

    Dim swApp As SldWorks.SldWorks
    Set swApp = CreateObject("SldWorks.Application")
    
    If swApp.GetUserPreferenceToggle(swDisplayEnableSelectionThroughTransparency) Then
        swApp.SetUserPreferenceToggle swDisplayEnableSelectionThroughTransparency, False
    Else
        swApp.SetUserPreferenceToggle swDisplayEnableSelectionThroughTransparency, True
    End If

End Sub
 
Also that to temporarily toggle it, you can use Shift-select.

I've seem SW change this setting on me automatically sometimes 10x in a day. Can't figure out what is triggering it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top