FeaturePython Custom Properties/fr

Espace réservé pour les descriptions détaillées des propriétés des fonctions de Python

Les propriétés sont les briques de base de construction des objets FeaturePython. Grâce à eux, l'utilisateur pourra interagir et modifier son objet. Après avoir créé un nouvel objet FeaturePython dans votre document (obj=FreeCAD.ActiveDocument.addObject("App::FeaturePython","Box")), vous pouvez obtenir une liste des propriétés disponibles en tapant:

Vous obtiendrez une liste des propriétés disponibles:

This code will create an object with internal name (automatically renamed to  and so on, if an object named  already exists) and give it the user-friendly label  (this label will be displayed in the Tree view and Combo view. Expressions can refer to this object by its label using.

is the type of the property. The different types are described in more detail below.

You can also use the short form which omits the last two arguments. The subsection defaults to, and the tooltip is not displayed with this form.

To get or set the property, use

If the type of the property is App::PropertyEnumeration, the setter has a special behaviour: setting a list of strings defines the cases allowed by the enumeration, setting a string selects one of these cases. To set the list of possible cases and set the current one, use:

App::PropertyAcceleration
A acceleration property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyAngle
A angle property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyArea
A area property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyBool
A boolean property. It can contain and. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyBoolList
A property containing a list of booleans. It can contain a python list of booleans, e.g. . For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyColor
A color property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyColorList
A colorList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyDirection
A direction property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyDistance
A distance property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyEnumeration
An enumeration property. The allowed items are defined by setting the property to a list. After that, it can contain items of the given list. The list of allowed items can be changed by setting the property to a list again. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyExpressionEngine
A expressionEngine property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFile
A filename property. It can contain a string indicating the path to a filename :(Does it allow relative paths or absolute paths or both?). For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFileIncluded
A fileIncluded property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFloat
A float property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFloatConstraint
A floatConstraint property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFloatList
A floatList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFont
A font property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyForce
A force property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFrequency
A frequency property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyInteger
A integer property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyIntegerConstraint
A integerConstraint property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyIntegerList
A integerList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyIntegerSet
A integerSet property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLength
A length property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLink
A link property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkChild
A linkChild property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkGlobal
A linkGlobal property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkHidden
A linkHidden property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkList
A linkList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkListChild
A linkListChild property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkListGlobal
A linkListGlobal property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkListHidden
A linkListHidden property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSub
A linkSub property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubChild
A linkSubChild property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubGlobal
A linkSubGlobal property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubHidden
A linkSubHidden property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubList
A linkSubList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubListChild
A linkSubListChild property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubListGlobal
A linkSubListGlobal property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyLinkSubListHidden
A linkSubListHidden property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyMap
A map property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyMaterial
A material property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyMaterialList
A materialList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyMatrix
A matrix property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPath
A path property. It can contain a string representing a path to a folder :(does it also allow paths to files? does it allow relative or absolute paths or both?). For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPercent
A percent property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPersistentObject
A persistentObject property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPlacement
A placement property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPlacementLink
A placementLink property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPlacementList
A placementList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPosition
A position property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPrecision
A precision property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPressure
A pressure property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyPythonObject
A pythonObject property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyQuantity
A quantity property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyQuantityConstraint
A quantityConstraint property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertySpeed
A speed property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyString
A string property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyStringList
A stringList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyUUID
A uUID property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyVacuumPermittivity
A vacuumPermittivity property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyVector
A vector property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyVectorDistance
A vectorDistance property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyVectorList
A vectorList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyVolume
A volume property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyXLink
A xLink property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyXLinkList
A xLinkList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyXLinkSub
A xLinkSub property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyXLinkSubList
A xLinkSubList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Mesh::PropertyCurvatureList
A curvatureList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Mesh::PropertyMeshKernel
A meshKernel property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Mesh::PropertyNormalList
A normalList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Part::PropertyFilletEdges
A filletEdges property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Part::PropertyGeometryList
A geometryList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Part::PropertyPartShape
A partShape property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Part::PropertyShapeHistory
A shapeHistory property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Path::PropertyPath
A path property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Path::PropertyTool
A tool property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Path::PropertyTooltable
A tooltable property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Sketcher::PropertyConstraintList
A constraintList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Spreadsheet::PropertyColumnWidths
A columnWidths property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Spreadsheet::PropertyRowHeights
A rowHeights property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Spreadsheet::PropertySheet
A sheet property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

Spreadsheet::PropertySpreadsheetQuantity
A spreadsheetQuantity property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

TechDraw::PropertyCenterLineList
A centerLineList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

TechDraw::PropertyCosmeticEdgeList
A cosmeticEdgeList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

TechDraw::PropertyCosmeticVertexList
A cosmeticVertexList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.

TechDraw::PropertyGeomFormatList
A geomFormatList property. It can contain "allowed type and/or values". For more details, see the section about Creating a FeaturePython object and adding a property to it.