Macro Toggle Visibility

Description
This is a set of three 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
 * 5) make all objects invisible

How To Use
Copy the macros and the icons in your folder macros and run (see Macro Install HowTo)

Macro SelectVisible
This macro selects all visible objects and deselect others in the active document.

The code SelectVisible.FCMacro is here: https://github.com/FreeCAD/FreeCAD-macros/blob/master/Utility/SelectVisible.FCMacro.

Macro VisibleAlls
This macro makes all objects visible.

The code Macro VisibleAlls.FCMacro the icon

Macro HiddenAlls
This macro hides all objects.

The code Macro HiddenAlls.FCMacro the icon

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

Version
ver 00.02 12/11/2015 macro Macro_SelectVisible : hidden the objects not selected, if not object selected displayed all objects, hidden all objects. This version include the tree macro in one