Map "Show with dependents" to hotkey

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
SPerman
Posts: 1874
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2053
x 1709
Contact:

Map "Show with dependents" to hotkey

Unread post by SPerman »

Is it possible to map the "Show with Dependents" functionality to a hotkey?
image.png
If not I found this Macro which I can use.

https://www.codestack.net/solidworks-ap ... ependents/
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
AlexB
Posts: 452
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 401

Re: Map "Show with dependents" to hotkey

Unread post by AlexB »

You can map macros to hotkeys
image.png
User avatar
SPerman
Posts: 1874
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2053
x 1709
Contact:

Re: Map "Show with dependents" to hotkey

Unread post by SPerman »

That is plan B. I was hoping for a simpler solution.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
josh
Posts: 263
Joined: Thu Mar 11, 2021 1:05 pm
Answers: 11
x 19
x 456

Re: Map "Show with dependents" to hotkey

Unread post by josh »

The simplest is actually to right-click and hit "W". You do have to click to select it after all. Might as well right-click instead of left. All of the items in the right-click menu have a letter you can use to activate them. You can see that letter by going all the way to the bottom of the RMB menu and hitting "Customize Menu". The underlined letter when you do this is the shortcut. Unfortunately, you can't change the underlined letter.

Alternately, there is a one-line macro possible for this. I don't know why the one you linked is so dang long and complicated.
User avatar
SPerman
Posts: 1874
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2053
x 1709
Contact:

Re: Map "Show with dependents" to hotkey

Unread post by SPerman »

I just glanced at it, but it did seem a bit convoluted.

You bring up a good point about having to pre-select it. (Solidworks has me spoiled by letting me do almost everything in any order I want.) The end goal is to map it to a key on a 3d mouse. I might do the macro so that it will default to the top level assembly. (I think I will do something similar for "move with triad", but have it prompt me to pick the part/asm.)

Thanks for your help with this.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
josh
Posts: 263
Joined: Thu Mar 11, 2021 1:05 pm
Answers: 11
x 19
x 456

Re: Map "Show with dependents" to hotkey

Unread post by josh »

Looking at the code again, one of the additional complications that the macro does is automatically select the top level assembly if nothing is already selected.
Post Reply