Selection API/de: Difference between revisions

From FreeCAD Documentation
No edit summary
(Created page with "Das Auswahl-Teilmodul ist Teil des FreeCAD-GUI-Moduls. Beispiel:")
 
Line 2: Line 2:
{{VeryImportantMessage|(October 2019) Diese Seite nicht bearbeiten. Die Informationen sind unvollständig und veraltet. Zur neuesten API siehe [https://www.freecadweb.org/api autogenerated API documentation] (engl.) oder erstelle selbst die Dokumentation, siehe dazu [[Source documentation/de|Quelldokumentation]].}}
{{VeryImportantMessage|(October 2019) Diese Seite nicht bearbeiten. Die Informationen sind unvollständig und veraltet. Zur neuesten API siehe [https://www.freecadweb.org/api autogenerated API documentation] (engl.) oder erstelle selbst die Dokumentation, siehe dazu [[Source documentation/de|Quelldokumentation]].}}


Das Auswahl-Teilmodul ist Teil des FreeCAD-GUI-Moduls. Beispiel:
The selection submodule is part of the FreeCADGui module. Example:
{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui

Latest revision as of 06:03, 9 April 2023

Other languages:
(October 2019) Diese Seite nicht bearbeiten. Die Informationen sind unvollständig und veraltet. Zur neuesten API siehe autogenerated API documentation (engl.) oder erstelle selbst die Dokumentation, siehe dazu Quelldokumentation.

Das Auswahl-Teilmodul ist Teil des FreeCAD-GUI-Moduls. Beispiel:

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: