Selection API/it: Difference between revisions

From FreeCAD Documentation
(aggiornato)
Line 12: Line 12:
{{APIFunction|removeSelection|FreeCAD.Object|Removes an object from the selection| }}
{{APIFunction|removeSelection|FreeCAD.Object|Removes an object from the selection| }}


{{languages/it | {{en|Selection_API}} {{es|Selection_API/es}} {{fr|Selection_API/fr}} }}
{{languages/it | {{en|Selection_API}} {{es|Selection_API/es}} }}


[[Category:API/it]]
[[Category:API/it]]

Revision as of 20:50, 16 June 2014

API del modulo Selezione

Il sottomodulo Selection fa parte del modulo FreeCADGui. Esempio:

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 document objects for a given document name. If no document is given the complete selection is returned.

Returns: a list of document objects in the order they were selected.

getSelectionEx([string])

Description: Returns a list of SelectionObject for a given document name. If no document is given the complete selection is returned. Used for selecting subobjects (ex some Edges of a Face).

Returns: a list of SelectionObjects in the order they were selected

isSelected(FreeCAD.Object)

Description: Checks if a given object is selected

Returns:

removeSelection(FreeCAD.Object)

Description: Removes an object from the selection

Returns:

Altre lingue: