FeaturePython Custom Properties/fr

Introduction
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.

Créer un objet FeaturePython et lui ajouter une propriété
Ce code créera un objet avec le nom interne (automatiquement renommé en  et ainsi de suite, si un objet nommé  existe déjà) et lui donnera l'étiquette personnalisée. (cette étiquette sera affichée dans la Vue en arborescence et la Vue combinée. Les Expressions peuvent faire référence à cet objet par son étiquette en utilisant.

Pour ajouter une propriété à cet objet, utilisez la forme longue de comme indiqué ci-dessous. FreeCAD divisera automatiquement et l'affichera avec des espaces  dans l' Onglet Données de la vue Propriété ou dans la Vue combinée.

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

Vous pouvez également utiliser la forme courte qui omet les deux derniers arguments. La sous-section a par défaut la valeur et l'infobulle n'est pas affichée avec ce formulaire.

Pour obtenir ou définir la propriété, utilisez.

Si le type de la propriété est App::PropertyEnumeration, le setter a un comportement spécial : la définition d'une liste de chaînes définit les cas autorisés par l'énumération, la définition d'une chaîne sélectionne l'un de ces cas. Pour définir la liste des cas possibles et définir le cas actuel, utilisez :

App::PropertyAcceleration
Une propriété d'accélération. Elle peut contenir des "types et/ou valeurs autorisés". Pour plus de détails, voir la section Créer un objet FeaturePython et lui ajouter une propriété.

App::PropertyAngle
Une propriété d'angle. Elle peut contenir une valeur. Vous pouvez utiliser la variable "Value" pour obtenir une variable flottante. Pour plus de détails, voir la section Créer un objet FeaturePython et lui ajouter une propriété.

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 tuple of four values. Each item can take values between 0.0 and 1.0. You can set red, green and blue values. Also you can set step transparency too. 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 a value. You can use "Value" variable to get float variable. Values always must be in millimeters unit. 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 a value. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFloatConstraint
A float constraint property. It can contain a value. By using this property you can set start and finish values. Also you can set step interval too. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyFloatList
A float list property. It can contain list of 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
An integer property. It can contain an integer value. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyIntegerConstraint
An integer constraint property. It can contain an value. By using this property you can set start and finish values. Also you can set step interval too. 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
An integer list property. It can contain list of 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 a value. You can use "Value" variable to get float variable. Values always must be in millimeters unit. 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 link to an object. When you call this property, it will return the linked object. 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 link list property. It can contain list of linked objects. 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 a FreeCAD material object. For more details, see the section about Creating a FeaturePython object and adding a property to it.

App::PropertyMaterialList
A material list property. It can contain list of materials. 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 object. 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 placement list property. It can contain list of. 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 a FreeCAD object. 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 vector list property. It can contain list of. 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 mesh kernel property. It can contain a object. 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 part shape property. It can contain object. 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.