Macro Visibility_Manager

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
TheMarkster
Posts: 1061
Joined: Thu Apr 05, 2018 1:53 am

Macro Visibility_Manager

Postby TheMarkster » Tue Aug 06, 2019 1:56 am

Macro_Visibility_Manager

With this macro you can manage visibility of document objects either by type or individually. It operates in 2 modes: Show Type and Show All.

In Show Type mode (default) you only see the document object types, e.g. Sketch, but not Sketch001, Sketch002, etc. In this mode you can have all Sketches, for example, visible or invisible, but not individually.

In Show All mode (press Shift key while invoking the macro) you see all objects and can manipulate their visibility individually.

For example, suppose you wish only your sketches to be visible. Run the macro and toggle the All checkbox, then again to uncheck so that all objects in the document will be invisible. Then toggle the Sketch checkbox and click OK. Of course, if your sketch is in a part design body you still will not be able to see it because if the body is invisible, then so will all objects within it. So, you would also need to select the Body checkbox in order to actually see them in the 3d view.

The problem here is now you have maybe a bunch of sketches visible and you only are interested in seeing 1. In that case run the macro again, but this time hold the Shift key (Mac users, please verify I believe this would be the Command key for you) while running the macro. This puts in show All mode. Now you can select only the sketch you want to see or only the body.

.
Snip macro screenshot-45e905.png
Snip macro screenshot-45e905.png (24.36 KiB) Viewed 440 times
In this screenshot you can see a bit of a failure: the checkboxes for Circle003, Circle004, and Circle005 are shown when it should only be Circle. Why? This is because the macro works by looking for unique names, then not showing the checkboxes for those objects having the same root, e.g. Circle. But in this particular file the original Circle object was deleted, along with Circle001 and Circle002, so the macro fails to see that the other Circle objects are all of the same type.

.
Snip macro screenshot-a83853.png
Snip macro screenshot-a83853.png (21.19 KiB) Viewed 440 times
In this screenshot we are in Show All mode and you can see all the Box types, not just Box (Billet).
TheMarkster
Posts: 1061
Joined: Thu Apr 05, 2018 1:53 am

Re: Macro Visibility_Manager

Postby TheMarkster » Tue Aug 06, 2019 4:28 am

I've made a few updates. New version is 1.04.