Macro Toggle Visibility2 1-2/en

Description
This is a set of four related macros for managing the visibility of objects in the Object Model:
 * 1) objects that are selected in a document are made visible while objects that are not selected are made invisible
 * 2) *if no objects are selected then all objects are hidden;
 * 3) *if all objects are selected then all objects are made visible
 * 4) make all objects visible

How To Use
Copy the macros and the icons in your folder macros and run (see How to install macros)

ToggleVisibility
Using the selection of objects in the one of the FreeCAD views, this macro makes all selected objects visible and hides all objects which are not selected.

If no object(s) are selected then all objects are hidden

If all objects are hidden and there is no selection in ComboView then all object are made visible

The code Macro_ToggleSelectedObjectVisibility2.FCMacro the icon

DisplayAll
This macro makes all objects visible respecting the original visible and hidden objects after use the Macro_ToggleSelectedObjectVisibility macro.

The code Macro_DisplayAllObjects2 the icon

Link
The discussion on the forum Re: Proposal: select one or more pieces, hide the others.

Original idea Macro_Toggle_Visibility