Selection API

From FreeCAD Documentation
Revision as of 19:18, 30 August 2011 by Splineman (talk | contribs)

The selection submodule is part of the FreeCADGui module. Example:

import FreeCADGui
sel = FreeCADGui.Selection.getSelection()
addSelection(FreeCAD.Object)

Description: Adds an object to the selection

Returns:

clearSelection([string])

Description: Clears the selection of the given document name. If no document is given the complete selection is cleared.

Returns:

getSelection([string])

Description: Returns a list of selected objects for a given document name. If no document is given the complete selection is returned.

Returns: a list of objects

isSelected(FreeCAD.Object)

Description: Checks if a given object is selected

Returns:

removeSelection(FreeCAD.Object)

Description: Removes an object from the selection

Returns:

Available translations of this page: