Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Sep 9, 2005
36
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!
 
Replies continue below

Recommended for you

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