Tree view

Introduction
The tree view appears in the tab of the combo view, one of the most important panels in the interface; it shows all user defined objects that are part of a FreeCAD document. The tree view is a representation of the document's structure, and indicates what information is saved to disk.

These objects don't necessarily have to be geometrical shapes visible in the 3D view, but can also be supporting data objects created with any of the workbenches.



Working with the tree view
By default, whenever a new object is created, it is added to the end of the list in the tree view. The tree view allows managing the objects to keep them organized; it permits creating groups, moving objects inside groups, moving groups inside other groups, renaming objects, copying objects, deleting objects, and other operations in the context menu (right click) which depend on the currently selected object and the currently active workbench.

Many operations create objects that are dependent on a previously existing object. In this case, the tree view shows this relationship by absorbing the older object inside the new object. Expanding and collapsing the objects in the tree view shows the parametric history of that object. Objects that are deeper inside others are older, while objects that are outside are newer, and are derived from the older objects. By modifying the interior objects, the parametric operations propagate all the way to the top, generating a new result.





Actions
Since the tree view lists objects that may be visible in the 3D view, many of the actions are the same as those that can be executed from the 3D view.

When the application starts, the default Start Workbench is active, and no document has been created, right clicking on the tree view shows one sub-menu with four commands: These allow working with various documents, but are disabled if no document is present.
 * Copy selected
 * Copy active document
 * Copy all documents
 * Paste
 * Paste

Once a new document has been created the following become active:
 * Copy active document
 * Copy all documents
 * Copy all documents

In addition, Link actions are available.
 * Simple group
 * Group with links
 * Group with transform links
 * Make Link
 * Group with transform links
 * Make Link

Selecting the document
If you select the active document and right click, in addition to and, the following commands appear:
 * : if active, the tree view will show hidden items.
 * : shows an input field to search objects inside the selected document.
 * : closes the selected document.
 * : if active, the document's objects will not recompute automatically.
 * : if active, the document will allow recompute of only some objects.
 * : marks all objects of the document as touched, and ready for recompute.
 * : creates a group in the selected document.

Selecting objects
Once objects are added to the document right clicking them will show additional commands. These depend on the number of selected objects, their type and also on the active workbench. In most cases and with most workbenches (except the Start Workbench) the following commands are then available:
 * : launches a dialog to change the visual properties of the whole object.
 * : assigns a random color to the object.
 * : disabled.
 * : copies an object into memory.
 * : pastes the copied object into the document; the copy is added to the end of the tree view.
 * : removes the object from the document.
 * : if active, the selected object will be set as hidden.
 * : all dependent objects will be added to the selection. This way one can see the dependencies and e.g. delete all dependent objects at once. This option is only available if one of the selected objects has links.
 * : marks the selected object as touched, and ready for recompute.
 * : recomputes the selected object.
 * : starts editing the label of the selected object, not the name which is read-only. This option is only available if a single object is selected.

As an example of context menu extension, if a Part Box is right clicked while the Part Workbench is active the following additional commands are available:
 * : activates the edit mode of the object.
 * : launches the transform widget to move or rotate the object.
 * : launches a dialog to attach the object to one or more other objects.
 * : sets the color of selected faces of the object.
 * : makes the object visible or invisible in the 3D view.
 * : makes the selected object visible.
 * : makes the selected object invisible.
 * : toggles the selectability of the object in the 3D view.
 * : selects all instances of this object in the tree view.
 * : creates a variable in the Python console referencing the object

Keyboard actions
The following keyboard actions are available when the focus is on the Tree view:
 * +: opens a search box at the bottom of the tree, allowing to search and reach objects using their names or labels.
 * Expand and collapse actions using + combinations:
 * +: collapses selected item(s).
 * +: expands selected item(s).
 * +: expands selected item(s) with all their tier-1 children collapsed (deeper children remain unchanged).
 * +: expands selected item(s) with all their tier-1 children expanded as well (deeper children remain unchanged).

Overlay icons
One or more smaller overlay icons can be displayed on top of an object's default icon in the tree view. The available overlay icons and their meaning are listed below.

[[File:FreeCAD_Tree_view_recompute.png]] White check mark on blue background
This indicates that the object has to be recomputed, due to changes made to the model or because the user marked the object in the tree view context menu to be recomputed. In most cases recomputes are triggered automatically, but sometimes they are delayed for performance reasons.

[[File:FreeCAD_Tree_view_tip.png]] White arrow on green background
This indicates the so called Tip of a body. It is usually the last feature in a PartDesign Body and represents the whole body to the world outside of the body, e.g. when the body is exported or used in Part boolean operations. The tip can be changed by the user.

[[File:FreeCAD_Tree_view_unattached.png]] Purple chain link on white background
This is typically shown for sketches, geometric primitives, such as box, cylinder, etc. and Datum geometry. It indicates that the object is not attached to anything. It has no Attachment Offset and gets its position and alignment solely from its Placement property.

There is a Basic Attachment Tutorial explaining how to handle such objects.

[[File:FreeCAD_Tree_view_notfullyconstrained.png]] Yellow X
This is only used for sketches and indicates that the sketch is not fully constrained. Inside of Sketcher the number of remaining degrees of freedom is shown in the solver messages.

[[File:FreeCAD_Tree_view_error.png]] White exclamation mark on red background
This indicates that the object has an error that needs to be fixed. After recomputing the whole document a tooltip describing the error is shown when you hover the mouse over the object in the tree view. Note: All other objects depending on an object in such an error state will not be properly recomputed, thus they may still show some old state.