Object API/de

From FreeCAD Documentation
Revision as of 16:27, 2 September 2021 by Le Loup (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎română
(Oktober 2019) Bearbeite diese Seiten nicht. Die Informationen sind unvollständig und veraltet. Die neueste API findest Du in der autogenerierten API-Dokumentation oder generiere die Dokumentation selbst, siehe Quelldokumentation.

Being parametric, document objects in FreeCAD can have a lot of additional properties, but these are the basic ones, present in every FreeCAD Document Object. Objects can be retrieved simply by their name. Example:

myObj = FreeCAD.ActiveDocument.myObjectName
print myObj.PropertiesList
Property.png Content

Returns: An XML representation of the properties of an object.

Property.png Label

Returns: Gets/sets the objects label. The string can be unicode.

Property.png Name

Returns: The unique name of an object.

Property.png Placement

Returns: Gets/sets the Placement of an object. A placement defines an orientation (rotation) and a position (base) in 3D space. It is used when no scaling or other distortion is needed.

Property.png PropertiesList

Returns: A list of the properties of an object

Property.png State

Returns: The FreeCAD state of an object (ie. if it needs to be recomputed)

Property.png Type

Returns: A string describing the type of an object

Property.png ViewObject

Returns: The associated View Provider (FreeCADGUI object) of an object

Method.png getAllDerivedFrom( )


Returns: All descendants of this object

Method.png getDocumentationOfProperty( )


Returns: The documentation string of the property of this class.

Method.png getGroupOfProperty( )


Returns: The name of the group which the property belongs to in this class. The properties are sorted in different named groups for convenience.

Method.png getPropertyByName( )


Returns: The value of a named property.

Method.png getTypeOfProperty( )


Returns: The type of a named property. This can be (Hidden,ReadOnly,Output) or any combination.

Method.png isDerivedFrom( )


Returns: True if given type is a father

Method.png purgeTouched( )

Description: Marks the object as unchanged


Method.png touch( )

Description: Marks the object as changed (touched)