Tab-To-(only temporarily)-Hide
Tab-To-(only temporarily)-Hide
Maybe dumb question before I go to create an ER… TAB key to hide is pretty handy for quickly moving around in assemblies. However, when I’m doing that kind of hiding, I usually want to re-show everything, but only the stuff that I hid using tab. Basically, I want TAB-to-hide to function sort of like Isolate but in reverse. For “permanently” hiding and showing things, I’d rather it not be that easy to do accidentally. I don't want to just show all hidden, because some stuff should stay hidden. I don't want to have to remember all the stuff I hid to see what I was looking for either. Does anyone else feel similar, or am I the weirdo? Or am I just missing some option somewhere…
- AlexLachance
- Posts: 2184
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2364
- x 2013
Re: Tab-To-(only temporarily)-Hide
Shift+Tab my friend!
An intern taught us that about 6 months ago, we were all amazed that we weren't aware of it's existance.
An intern taught us that about 6 months ago, we were all amazed that we weren't aware of it's existance.
Re: Tab-To-(only temporarily)-Hide
The workaround I usually use, mainly because of selecting contact surfaces for simulation, is to us the section view tool. If you create a section view through part or all of the assembly, then select the "Section By Component" with "Include Selected" set. This way I can select the things that will disappear and then click the green check to have a partially shown assembly.
This isn't necessarily an ideal use for the tool because selecting components that are buried beneath other visible components requires the use of the flyout feature tree.
You could also use Ctrl+Shift+Tab to temporarily show hidden components in order to click them to be visible again. You just have to be careful to not let go of the tab button last or it may re-hide the thing under your mouse.
This isn't necessarily an ideal use for the tool because selecting components that are buried beneath other visible components requires the use of the flyout feature tree.
You could also use Ctrl+Shift+Tab to temporarily show hidden components in order to click them to be visible again. You just have to be careful to not let go of the tab button last or it may re-hide the thing under your mouse.
- AlexLachance
- Posts: 2184
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2364
- x 2013
Re: Tab-To-(only temporarily)-Hide
True, show hidden components is also a very neat way of reshowing only what you need. The Shift+Tab is pretty cool but you need to know the exact location of what you want to unhide and you need to know all there is to unhide. The "Show hidden components" kind of removes these hurdles. There's even a neat filter to avoid envelopes showing up.AlexB wrote: ↑Thu May 16, 2024 9:01 am The workaround I usually use, mainly because of selecting contact surfaces for simulation, is to us the section view tool. If you create a section view through part or all of the assembly, then select the "Section By Component" with "Include Selected" set. This way I can select the things that will disappear and then click the green check to have a partially shown assembly.
This isn't necessarily an ideal use for the tool because selecting components that are buried beneath other visible components requires the use of the flyout feature tree.
You could also use Ctrl+Shift+Tab to temporarily show hidden components in order to click them to be visible again. You just have to be careful to not let go of the tab button last or it may re-hide the thing under your mouse.
Re: Tab-To-(only temporarily)-Hide
Shift+tab is no good...
-I don't want to un-hide any things that were already hidden before I started hiding things. If something big was there but already hidden, Shift-tab will unhide it first.
-I don't want to have to remember which or how many or where things were hidden. I just want to instantly revert to the display before I started hiding things. Similar to the behavior of Select Other when you can right-click on faces to temporarily hide them.
-I don't want to un-hide any things that were already hidden before I started hiding things. If something big was there but already hidden, Shift-tab will unhide it first.
-I don't want to have to remember which or how many or where things were hidden. I just want to instantly revert to the display before I started hiding things. Similar to the behavior of Select Other when you can right-click on faces to temporarily hide them.
- AlexLachance
- Posts: 2184
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2364
- x 2013
Re: Tab-To-(only temporarily)-Hide
Hrm, I'm not sure there is any way to do what you desire. There is "isolate" that sorta does that, but I'm pretty sure that's not what you're looking for. Isolate would need you to select everything you want kept...josh wrote: ↑Thu May 16, 2024 9:16 am Shift+tab is no good...
-I don't want to un-hide any things that were already hidden before I started hiding things. If something big was there but already hidden, Shift-tab will unhide it first.
-I don't want to have to remember which or how many or where things were hidden. I just want to instantly revert to the display before I started hiding things. Similar to the behavior of Select Other when you can right-click on faces to temporarily hide them.
Perhaps you could do a reverse selection and then isolate to get the result you desire and then quit isolate to get back to what you want..? Just thinking off the top of my head.
Re: Tab-To-(only temporarily)-Hide
Could you write a macro/add-in that runs in the background and keeps track of the items you've hidden, and gives you a button to show them?
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Re: Tab-To-(only temporarily)-Hide
Yep... That's pretty much what I said in my first post :-)AlexLachance wrote: ↑Thu May 16, 2024 9:20 am Hrm, I'm not sure there is any way to do what you desire. There is "isolate" that sorta does that, but I'm pretty sure that's not what you're looking for. Isolate would need you to select everything you want kept...
Perhaps you could do a reverse selection and then isolate to get the result you desire and then quit isolate to get back to what you want..? Just thinking off the top of my head.
- DanPihlaja
- Posts: 849
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 812
- x 979
Re: Tab-To-(only temporarily)-Hide
If you hit CTRL + SHIFT + TAB, it temporarily shows you what is hidden, and you can select it to show it again. It won't do exactly what you want. But as far as I know it is closest.
Better than SHIFT + TAB because you can select what you want to unhide and not have to cycle through the visible layers of things that are stacked on top of each other.
Better than SHIFT + TAB because you can select what you want to unhide and not have to cycle through the visible layers of things that are stacked on top of each other.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- DanPihlaja
- Posts: 849
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 812
- x 979
Re: Tab-To-(only temporarily)-Hide
Also, there is Isolate.
Which does something similar to what you want. (of course, you mentioned isolate in your OP, so this may not work....but for other people looking....)
CTRL select a bunch of things, then RMB on them and select "Isolate"
It hides everything EXCEPT those things. Then gives you a little toolbar to save what is shown as a display state if you want so you can go quickly back to that state. Or "exit Isolate" which just reverts you back to the preview view.
Which does something similar to what you want. (of course, you mentioned isolate in your OP, so this may not work....but for other people looking....)
CTRL select a bunch of things, then RMB on them and select "Isolate"
It hides everything EXCEPT those things. Then gives you a little toolbar to save what is shown as a display state if you want so you can go quickly back to that state. Or "exit Isolate" which just reverts you back to the preview view.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- DanPihlaja
- Posts: 849
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 812
- x 979
Re: Tab-To-(only temporarily)-Hide
You could create a display state right before you start hiding.
Then revert to that display state to get back to what you want.
Even if you write a macro, this may be the way to do it.
Then revert to that display state to get back to what you want.
Even if you write a macro, this may be the way to do it.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
Re: Tab-To-(only temporarily)-Hide
Seriously? SW cannot get undo/redo to function, why would we ask them to implement an undo stack for tab hide commands? I like the idea, and we would use it frequently; doubtful of an ER implementing that doesn't mess up something else.
I'm guessing their response is use Display States.
- AlexLachance
- Posts: 2184
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2364
- x 2013
Re: Tab-To-(only temporarily)-Hide
Heck, Isolate messes up display states some times, so I wouldn't hold my breath for SolidWorks to develop a specific case command such as the one Josh seems to require. Maybe I'm not seeing the bigger picture and there would be many more use-case then I can see for it.bnemec wrote: ↑Thu May 16, 2024 11:17 am Seriously? SW cannot get undo/redo to function, why would we ask them to implement an undo stack for tab hide commands? I like the idea, and we would use it frequently; doubtful of an ER implementing that doesn't mess up something else.
I'm guessing their response is use Display States.
Re: Tab-To-(only temporarily)-Hide
Here's a very rough concept of how it may work.
While the user form is active, you can hide whatever components you want
When you're done, click Stop and it will revert any display state changes (hidden -> visible / visible -> hidden) and then close the form
Original GIF (click to view): This could be optimized but a fair bit but it works ok for now. Feel free to download and modify whatever you need.
Edit:
Updated with locking the ui when unhiding to make it faster
Edit 2:
Updated UI and added some error checking.
v2 GIF (click to view): Edit 3:
Updated to version 3 which should automatically throw focus back to SW when activated to reduce the number of clicks needed
While the user form is active, you can hide whatever components you want
When you're done, click Stop and it will revert any display state changes (hidden -> visible / visible -> hidden) and then close the form
Original GIF (click to view): This could be optimized but a fair bit but it works ok for now. Feel free to download and modify whatever you need.
Edit:
Updated with locking the ui when unhiding to make it faster
Edit 2:
Updated UI and added some error checking.
v2 GIF (click to view): Edit 3:
Updated to version 3 which should automatically throw focus back to SW when activated to reduce the number of clicks needed
- Attachments
-
- TemporaryHide v3.swp
- (160.5 KiB) Downloaded 165 times
-
- TemporaryHide v2.swp
- (115 KiB) Downloaded 169 times
-
- TemporaryHide.swp
- (96 KiB) Downloaded 175 times
- Glenn Schroeder
- Posts: 1521
- Joined: Mon Mar 08, 2021 11:43 am
- Location: southeast Texas
- x 1759
- x 2130
Re: Tab-To-(only temporarily)-Hide
Josh,
If you haven't already answered your daily quota of dumb questions, why not just use display states?
If you haven't already answered your daily quota of dumb questions, why not just use display states?
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."
Ray Wylie Hubbard in his song "Mother Blues"
Ray Wylie Hubbard in his song "Mother Blues"
Re: Tab-To-(only temporarily)-Hide
NX had a feature somewhat like this. If you were in the middle of an operation, any object you hid would reappear when you completed that operation. Say you are trying to create a mate, and there are a couple of objects that need to be hidden to access the faces needed for that mate. Once you close the mate creation dialog, everything re-appears. (At least that is how I remember it. NX get's further away in the rear view mirror every day.)AlexB wrote: ↑Thu May 16, 2024 11:49 am Here's a very rough concept of how it may work.
While the user form is active, you can hide whatever components you want
When you're done, click Stop and it will revert any display state changes (hidden -> visible / visible -> hidden) and then close the form
GIF (click to view):
TempHide.gif
This could be optimized but a fair bit but it works ok for now. Feel free to download and modify whatever you need.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Re: Tab-To-(only temporarily)-Hide
@Glenn Schroeder In this instance what Josh is asking for is something that is very much needed for a VERY long time. How it's been implemented so far is just convoluted and hacked up that it makes no sense.
Display states is not an solution to working in this way because that is not being dynamic while modeling and you have to set things up after they're made. This hiding and unhiding is something that you want to do interactively while trying to get to components or swap out Parts and Assemblies.
Display states is not an solution to working in this way because that is not being dynamic while modeling and you have to set things up after they're made. This hiding and unhiding is something that you want to do interactively while trying to get to components or swap out Parts and Assemblies.
Re: Tab-To-(only temporarily)-Hide
What really makes this so VERY poorly implemented is that it is the hot keys cannot be changed aka assigned to new keyboard items. That it is hard coded makes NO sense at all!!!!!
Here's a list of what needs to be in the software....
- Hide : Everything
- Show: Everything
- Hide Selected
- Show Selected: What is hidden is all shown, select what's needed, and only that is what is added to what is shown.
- Isolate: What is selected stays, everything else hides.
- The Hide-Swap: command conceals all visible objects and re-displays all previously hidden objects.
Here's a list of what needs to be in the software....
- Hide : Everything
- Show: Everything
- Hide Selected
- Show Selected: What is hidden is all shown, select what's needed, and only that is what is added to what is shown.
- Isolate: What is selected stays, everything else hides.
- The Hide-Swap: command conceals all visible objects and re-displays all previously hidden objects.
Re: Tab-To-(only temporarily)-Hide
But what is the definition of 'before I started'? Since it isn't a group operation, SW has no idea that two hide operations are related. They could be seconds apart or hours apart.
You could perhaps use ModelDocExtension::StartRecordingUndoObject/FinishRecordingUndoObject. Create two macros, one for starting a group operation and one for finishing. The first just calls StartRecordingUndoObject and the second would call FinishRecordingUndoObject and then at least the undo list would have a single entry to undo. Of course, if any other undoable operations occur between the start and stop they will be undone as well.
Re: Tab-To-(only temporarily)-Hide
My goal here is for very temporarily hiding components to work on stuff behind or inside them. I don't want to be creating display states or messing with creating section views. I just want to hide these few parts, work on some stuff, then re-show them.Glenn Schroeder wrote: ↑Thu May 16, 2024 11:49 am Josh,
If you haven't already answered your daily quota of dumb questions, why not just use display states?
- Glenn Schroeder
- Posts: 1521
- Joined: Mon Mar 08, 2021 11:43 am
- Location: southeast Texas
- x 1759
- x 2130
Re: Tab-To-(only temporarily)-Hide
That makes sense. Thanks.
I don't know if this will help, but I work with concrete and rebar often, and when I'm placing the rebar I make the concrete transparent. That allows me to see the rebar, and select it when needed, and when I'm finished I click on a face of the concrete and select the "Change Transparency" icon to make it opaque again. That works well for me.
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."
Ray Wylie Hubbard in his song "Mother Blues"
Ray Wylie Hubbard in his song "Mother Blues"
Re: Tab-To-(only temporarily)-Hide
This works pretty much like I want... Has to be mapped to a shortcut key, because it works the same as TAB. Unfortunately, I can't map it to TAB. Hover over something and press the shortcut key to hide it. Hit the button, close the form, switch documents, etc. and the components that were hidden by the macro get re-shown. Hit the down arrow on the form and you can see a list of what you've hidden. One quirk... Since it works by hovering rather than clicking, when the userform has focus (right after you run the macro for the first time, or click the down arrow, etc), you have to click back in the graphics area before the shortcut key works again.
- Attachments
-
- ReverseIsolate.swp
- (96 KiB) Downloaded 184 times
Re: Tab-To-(only temporarily)-Hide
@josh I ended up getting my code to throw focus back to SW using the AppActivate command. It requires the full title of the window as shown in the Task Manager so I can't guarantee it works for all license types (i.e. our network licenses all default to "Premium" regardless of the level we have checked out)
See my post above for version 3 of my macro. It monitors the visibility changes of components so you can use tab to hide items after triggering the user form to show.
See my post above for version 3 of my macro. It monitors the visibility changes of components so you can use tab to hide items after triggering the user form to show.
Re: Tab-To-(only temporarily)-Hide
Thanks! I went the route of getting the window handle of the active view, then GetParent an appropriate number of times to get the handle to SW for SetActiveWindow