Object API: Difference between revisions
(Marked this version for translation) |
Renatorivo (talk | contribs) No edit summary |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
<translate> |
<translate> |
||
⚫ | |||
{{VeryImportantMessage|(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the [https://www.freecadweb.org/api autogenerated API documentation], or generate the documentation yourself, see [[Source documentation|Source documentation]].}} |
|||
<!--T:1--> |
<!--T:1--> |
||
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: |
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: |
||
</translate> |
|||
{{Code|code= |
|||
<!--T:2--> |
|||
myObj = FreeCAD.ActiveDocument.myObjectName |
myObj = FreeCAD.ActiveDocument.myObjectName |
||
print myObj.PropertiesList |
|||
}} |
|||
<translate> |
|||
<!--T:3--> |
<!--T:3--> |
||
{{APIProperty|Content| |
{{APIProperty|Content|An XML representation of the properties of an object.}} |
||
{{APIProperty|Label|Gets/sets the objects label. The string can be unicode.}} |
{{APIProperty|Label|Gets/sets the objects label. The string can be unicode.}} |
||
{{APIProperty|Name| |
{{APIProperty|Name|The unique name of an object.}} |
||
{{APIProperty|Placement|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.}} |
{{APIProperty|Placement|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.}} |
||
{{APIProperty|PropertiesList| |
{{APIProperty|PropertiesList|A list of the properties of an object}} |
||
{{APIProperty|State| |
{{APIProperty|State|The FreeCAD state of an object (ie. if it needs to be recomputed)}} |
||
{{APIProperty|Type| |
{{APIProperty|Type|A string describing the type of an object}} |
||
{{APIProperty|ViewObject| |
{{APIProperty|ViewObject|The associated View Provider (FreeCADGUI object) of an object}} |
||
{{APIFunction|getAllDerivedFrom| | | |
{{APIFunction|getAllDerivedFrom| | |All descendants of this object}} |
||
{{APIFunction|getDocumentationOfProperty| | | |
{{APIFunction|getDocumentationOfProperty| | |The documentation string of the property of this class.}} |
||
{{APIFunction|getGroupOfProperty| | | |
{{APIFunction|getGroupOfProperty| | |The name of the group which the property belongs to in this class. The properties are sorted in different named groups for convenience.}} |
||
{{APIFunction|getPropertyByName| | | |
{{APIFunction|getPropertyByName| | |The value of a named property.}} |
||
{{APIFunction|getTypeOfProperty| | | |
{{APIFunction|getTypeOfProperty| | |The type of a named property. This can be (Hidden,ReadOnly,Output) or any combination.}} |
||
{{APIFunction|isDerivedFrom| | |True if given type is a father}} |
{{APIFunction|isDerivedFrom| | |True if given type is a father}} |
||
{{APIFunction|purgeTouched| |Marks the object as unchanged| }} |
{{APIFunction|purgeTouched| |Marks the object as unchanged| }} |
||
{{APIFunction|touch| |Marks the object as changed (touched)| }} |
{{APIFunction|touch| |Marks the object as changed (touched)| }} |
||
⚫ | |||
⚫ | |||
</translate> |
</translate> |
||
{{Userdocnavi{{#translation:}}}} |
|||
⚫ | |||
⚫ | |||
[[Category:Poweruser Documentation{{#translation:}}]] |
|||
{{clear}} |
Latest revision as of 21:02, 27 February 2020
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
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.
Description:
Returns: The documentation string of the property of this class.
Description:
Returns: The name of the group which the property belongs to in this class. The properties are sorted in different named groups for convenience.
Description:
Returns: The type of a named property. This can be (Hidden,ReadOnly,Output) or any combination.
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub