Every value in Document.xml and GuiDocument.xml sits inside a
Property element whose type attribute names a C++ property
class (see Properties). Each class
writes its own child element. This page lists them, from FreeCAD’s source (main
branch, read in November 2026); the type names match the FreeCAD wiki’s list of
property types. Types derived from another type write the same element as their
parent. Numbers follow the rules on the
document page; text is escaped with
FreeCAD’s attribute encoder.
Numbers, text and flags
| Type | Element | Attributes | Meaning |
|---|---|---|---|
App::PropertyInteger | Integer | value | Integer |
App::PropertyIntegerConstraint, App::PropertyPercent | Integer | value; min, max, step | Integer with limits; the limits are written only when the property owns a constraint set at run time |
App::PropertyFloat | Float | value | Double |
App::PropertyFloatConstraint, App::PropertyPrecision | Float | value; min, max, step | Double with limits, written as for the integer constraint |
App::PropertyQuantity and every unit type (below) | Float | value | The number only; the unit follows from the property type |
App::PropertyBool | Bool | value | true or false; anything other than true reads as false |
App::PropertyString, App::PropertyFont, App::PropertyFile | String | value; restore | Text. restore appears only on an object’s Label in exported files: 1 keeps the label as written, 0 means the value is the object’s exported name and is mapped to its new name |
App::PropertyPath | Path | value | File system path |
App::PropertyUUID | Uuid | value | UUID text |
App::PropertyEnumeration | Integer | value; CustomEnum | Index of the chosen item. With CustomEnum="true" a CustomEnumList count element follows, holding one Enum value per item |
App::PropertyMap | Map | count | One Item child per entry, with key and value |
App::PropertyPersistentObject | String, then PersistentObject | value | The object’s class name, then the object’s own saved XML inside PersistentObject |
The unit types are written exactly like App::PropertyQuantity:
Acceleration, AmountOfSubstance, Angle,
Area, AreaMomentOfInertia,
CompressiveStrength, CurrentDensity, Density,
DissipationRate, Distance, DynamicViscosity,
ElectricalCapacitance, ElectricalConductance,
ElectricalConductivity, ElectricalInductance,
ElectricalResistance, ElectricCharge,
ElectricCurrent, ElectricPotential,
ElectromagneticPotential, Force, Frequency,
HeatFlux, InverseArea, InverseLength,
InverseVolume, KinematicViscosity, Length,
LuminousIntensity, MagneticFieldStrength,
MagneticFlux, MagneticFluxDensity,
Magnetization, Mass, MassMomentOfInertia,
Moment, Power, Pressure,
QuantityConstraint, ShearModulus,
SpecificEnergy, SpecificHeat, Speed,
Stiffness, StiffnessDensity, Stress,
SurfaceChargeDensity, Temperature,
ThermalConductivity, ThermalExpansionCoefficient,
ThermalTransferCoefficient, Time,
UltimateTensileStrength, VacuumPermittivity,
Velocity, Volume, VolumeChargeDensity,
VolumeFlowRate, VolumetricThermalExpansionCoefficient,
Work, YieldStrength and YoungsModulus, each
prefixed App::Property.
Lists and sets
| Type | Element | Attributes | Children or data |
|---|---|---|---|
App::PropertyIntegerList | IntegerList | count | I v per item |
App::PropertyIntegerSet | IntegerSet | count | I v per item |
App::PropertyIntPairList | IntPairList | count | Pair first second per item |
App::PropertyStringList | StringList | count | String value per item |
App::PropertyBoolList | BoolList | value | A string of 0 and 1 characters, the list converted as a Boost dynamic bitset |
App::PropertyFloatList | FloatList | file | Binary entry; empty file for an empty list |
App::PropertyVectorList | VectorList | file | Binary entry |
App::PropertyPlacementList | PlacementList | file | Binary entry |
App::PropertyColorList | ColorList | file | Binary entry; empty file for an empty list |
App::PropertyMaterialList | MaterialList | file, version | Binary entry, version="3" |
The layouts of the binary entries are on the
archive page. In XML-only output a
FloatList is written inline, as FloatList count with one
F v child per value.
Vectors, placements and colours
| Type | Element | Attributes | Meaning |
|---|---|---|---|
App::PropertyVector, App::PropertyVectorDistance, App::PropertyPosition, App::PropertyDirection | PropertyVector | valueX, valueY, valueZ | A 3D vector |
App::PropertyMatrix | PropertyMatrix | a11 … a44 | A 4 × 4 matrix, arc being row r, column c |
App::PropertyRotation | PropertyRotation | A, Ox, Oy, Oz | Rotation angle in radians about the axis (Ox, Oy, Oz) |
App::PropertyPlacement | PropertyPlacement | Px, Py, Pz, Q0–Q3, A, Ox, Oy, Oz | Position, then the rotation twice: as a quaternion (Q0, Q1, Q2 the vector part, Q3 the scalar part, cos of half the angle) and as angle and axis. When A is present the reader uses the angle and axis; older files have only the quaternion |
App::PropertyColor | PropertyColor | value | Packed colour 0xRRGGBBAA written as an unsigned decimal number |
App::PropertyMaterial | PropertyMaterial | ambientColor, diffuseColor, specularColor, emissiveColor, shininess, transparency, image, imagePath, uuid | Four packed colours as for PropertyColor, two numbers, and the material’s image, image path and UUID (the last three optional when reading) |
For files whose ProgramVersion is older than FreeCAD 1.1, the reader
inverts the alpha of colours, because the meaning of alpha changed in 1.1.
Links
Link properties refer to objects by internal name. The Child,
Global and Hidden variants of each link type differ only
in scope and write the same element.
| Type | Element | Attributes | Children |
|---|---|---|---|
App::PropertyLink (and LinkChild, LinkGlobal, LinkHidden, PlacementLink) | Link | value | None; empty value for no link |
App::PropertyLinkList (and variants) | LinkList | count | Link value per item |
App::PropertyLinkSub (and variants) | LinkSub | value (object), count | Sub per sub-element (below) |
App::PropertyLinkSubList (and variants) | LinkSubList | count | Link obj sub per pair (below) |
App::PropertyXLink, App::PropertyXLinkSub | XLink | See below | Sub children when there is more than one sub-element |
App::PropertyXLinkSubList, App::PropertyXLinkList | XLinkSubList | count, partial | One XLink per link |
Sub-element names, such as Edge3 or Face1, can have two
forms: an old-style name and a topological (mapped) name. The Sub
element’s value, and the sub attribute of
Link and XLink, hold the old-style name when there is one,
for older FreeCAD versions to read, and extra attributes carry the rest:
| Attribute | Meaning |
|---|---|
shadowed | The actual value, which differs from the old-style name written in value/sub; newer versions restore this one |
shadow | The new-style name, when the value set by the user is an old-style name |
mapped | 1 in exported files: the name was a mapped name, converted for export |
XLink attribute | Meaning |
|---|---|
file | The other document’s path, for a link to an object in another document; when exporting, FreeCAD tries to write an absolute path |
stamp | The other document’s LastModifiedDate |
name | The linked object’s internal name |
partial | 1: the linked document may be loaded partially |
sub | The sub-element, when there is exactly one |
count | Number of Sub children, when there are several |
shadowed, shadow, mapped | As above, for a single sub |
Expressions and Python objects
| Type | Element | Attributes | Meaning |
|---|---|---|---|
App::PropertyExpressionEngine | ExpressionEngine | count, xlink | Formulas bound to properties. xlink="1": an XLinks element comes first |
XLinks | count, docs, hidden | Links to other documents used by the formulas: docs DocMap children (name, label, index of a document), then one XLink per link; hidden lists the indices of hidden links separated by spaces | |
Expression | path, expression, comment | One per formula: the property path it drives, the formula text and an optional comment | |
App::PropertyPythonObject | Python | value, encoded, module, class, json, object, vobject | The state of a Python object, usually the Proxy of a scripted object. value is Base64 of a JSON text (encoded="yes"), made from the object’s dumps(), __getstate__ or __dict__. module and class name the Python class to recreate; json="yes" instead when there is no class. object="yes" or vobject="yes" link it back to its document object or view provider |
No Python code is stored: only the state, so the class must be available when the
file is opened. The reader also accepts a Python element with a
file attribute or an unencoded value.
Embedded files
| Type | Element | Attributes | Meaning |
|---|---|---|---|
App::PropertyFileIncluded | FileIncluded | file | Name of the ZIP entry holding the file, byte for byte; empty when no file is set |
FileIncluded | data | XML-only output: the file name, with the file’s bytes as Base64 in a CDATA section inside the element |
While the document is open, the file lives in the document’s transient folder and is made read-only after reading.
Part shapes
Part::PropertyPartShape, the Shape of Part and PartDesign
objects, writes a Part element, then optionally the shape’s string table
and element map.
| Element | Attribute | Meaning |
|---|---|---|
Part | file | The BREP entry, .brp (text) or .bin (binary); see shapes |
ElementMap | Version string of the topological element map; empty in exported files | |
HasherIndex | Which of the document’s string hashers the element map uses (written when the shape has an element map) | |
SaveHasher | 1: the hasher is saved with this shape and a StringHasher element follows | |
brep | XML-only output: 1, text BREP inline in CDATA instead of file | |
binary | XML-only output: 1, binary BREP inline as Base64 | |
StringHasher, StringHasher2 | as in Document.xml | With SaveHasher: the table, in the entry Object.Property.Table.txt |
ElementMap | (none) | Empty element when the shape has no element map |
new, count | Otherwise new="1" count="1" with one dummy Element key="Dummy" value="Dummy", which makes older versions recompute | |
ElementMap2 | file | The element map entry, Object.Property.Map.txt |
count | XML-only output: number of entries, with the map inline |
The element map and string table are written only when the ElementMap
version is not empty or SaveHasher is set. Other Part properties:
Part::PropertyFilletEdges writes FilletEdges file
(binary entry), and Part::PropertyShapeHistory and
Part::PropertyShapeCache write nothing, leaving the
Property element empty.
Meshes
| Type | Element | Attributes | Meaning |
|---|---|---|---|
Mesh::PropertyMeshKernel | Mesh | file | The mesh entry, MeshKernel.bms; in XML-only output the mesh is written inside the element |
Mesh::PropertyNormalList | VectorList | file | Normals, binary entry |
Mesh::PropertyCurvatureList | CurvatureList | file | Curvature data, binary entry |
Mesh::PropertyMaterial | Material | file | Mesh colours, binary entry |
Sketch geometry
Part::PropertyGeometryList, the Geometry of a sketch,
writes GeometryList count with one Geometry element per
curve. Geometry has a type attribute (the C++ type, e.g.
Part::GeomLineSegment) and migrated="1"; inside it,
GeoExtensions count holds the curve’s saved extensions, and then the
curve element:
| Type | Element | Attributes |
|---|---|---|
Part::GeomPoint | GeomPoint | X, Y, Z |
Part::GeomLine | GeomLine | PosX, PosY, PosZ, DirX, DirY, DirZ |
Part::GeomLineSegment | LineSegment | StartX, StartY, StartZ, EndX, EndY, EndZ |
Part::GeomCircle | Circle | CenterX/Y/Z, NormalX/Y/Z, AngleXU, Radius |
Part::GeomArcOfCircle | ArcOfCircle | As Circle, plus StartAngle, EndAngle |
Part::GeomEllipse | Ellipse | CenterX/Y/Z, NormalX/Y/Z, MajorRadius, MinorRadius, AngleXU |
Part::GeomArcOfEllipse | ArcOfEllipse | As Ellipse, plus StartAngle, EndAngle |
Part::GeomHyperbola | Hyperbola | CenterX/Y/Z, NormalX/Y/Z, MajorRadius, MinorRadius, AngleXU |
Part::GeomArcOfHyperbola | ArcOfHyperbola | As Hyperbola, plus StartAngle, EndAngle |
Part::GeomParabola | Parabola | CenterX/Y/Z, NormalX/Y/Z, Focal, AngleXU |
Part::GeomArcOfParabola | ArcOfParabola | As Parabola, plus StartAngle, EndAngle |
Part::GeomBezierCurve | BezierCurve | PolesCount; children Pole X Y Z Weight |
Part::GeomBSplineCurve | BSplineCurve | PolesCount, KnotsCount, Degree, IsPeriodic; children Pole X Y Z Weight, then Knot Value Mult |
CenterX/Y/Z stands for the three attributes CenterX,
CenterY and CenterZ, and likewise for
Normal. AngleXU turns the curve within its plane,
measured from a reference axis system the code builds from the centre and normal;
StartAngle and EndAngle are the trimmed curve’s first and
last parameters. A trimmed curve of another kind cannot be saved
(GeomTrimmedCurve throws “not implemented”).
Sketch constraints
Sketcher::PropertyConstraintList writes
ConstraintList count with one Constrain element (spelt
without the final t) per constraint.
| Attribute | Meaning |
|---|---|
Name | Constraint name, may be empty |
MetaData | Free metadata text |
Type | Constraint type, number (below) |
InternalAlignmentType | Only when Type is 15 (below) |
InternalAlignmentIndex | Only when Type is 15: index, e.g. of a B-spline pole or knot |
Orientation | Bit flags: 1 counter-clockwise, 2 clockwise, 4 internal, 8 external; 0 none |
Value | Dimension value (length, angle and so on) |
LabelDistance, LabelPosition | Where the dimension label is drawn |
IsDriving | 1 driving, 0 reference (driven) dimension |
IsInVirtualSpace | 1: shown in the sketch’s virtual space |
IsVisible | 1: visible |
IsActive | 1: active |
First, FirstPos, Second, SecondPos, Third, ThirdPos | The first three constrained elements, for older versions: a geometry index and a point position |
ElementIds, ElementPositions | All constrained elements: geometry indices and point positions, each a space-separated list (left out when empty) |
Type | Constraint | Type | Constraint |
|---|---|---|---|
| 0 | None | 11 | Radius |
| 1 | Coincident | 12 | Equal |
| 2 | Horizontal | 13 | PointOnObject |
| 3 | Vertical | 14 | Symmetric |
| 4 | Parallel | 15 | InternalAlignment |
| 5 | Tangent | 16 | SnellsLaw |
| 6 | Distance | 17 | Block |
| 7 | DistanceX | 18 | Diameter |
| 8 | DistanceY | 19 | Weight |
| 9 | Angle | 20 | Group |
| 10 | Perpendicular | 21 | Text |
InternalAlignmentType | Meaning |
|---|---|
| 0 | Undefined |
| 1 | Ellipse major diameter |
| 2 | Ellipse minor diameter |
| 3 | Ellipse focus 1 |
| 4 | Ellipse focus 2 |
| 5 | Hyperbola major |
| 6 | Hyperbola minor |
| 7 | Hyperbola focus |
| 8 | Parabola focus |
| 9 | B-spline control point |
| 10 | B-spline knot point |
| 11 | Parabola focal axis |
Point positions: 0 the edge itself (no point), 1 start point, 2 end point, 3 mid point (centre).
Worked example
Property elements from the FreeCAD wiki’s example Document.xml (the
whole file is on the document
page):
<Property name="Height" type="App::PropertyLength">
<Float value="10"/>
</Property>
<Property name="Label" type="App::PropertyString">
<String value="Box2"/>
</Property>
<Property name="Placement" type="App::PropertyPlacement">
<PropertyPlacement Px="0" Py="0" Pz="0" Q0="0" Q1="0" Q2="0" Q3="1"/>
</Property>
<Property name="Pos" type="App::PropertyPlacementLink">
<Link value=""/>
</Property>
<Property name="Shape" type="Part::PropertyPartShape">
<Part file="PartShape.brp2"/>
</Property>
App::PropertyLength is a unit type, so it writes a plain
Float. The placement has only the quaternion, so the reader builds the
rotation from Q0–Q3: the identity, since the scalar part
Q3 is 1. App::PropertyPlacementLink is a link type and
writes Link; its empty value means no link. A current FreeCAD would
also write the A, Ox, Oy and Oz
attributes on the placement and an ElementMap attribute on
Part, and would name the shape entry after the object and property.
Not confirmed
- The character order of
BoolList(which end is item 0): it follows Boost’s dynamic bitset conversion, which was not read. - The units in which unit types store their numbers: only the number is written, and FreeCAD’s internal unit for each quantity was not read.
- The axis written in
Ox,OyandOzfor a rotation of zero angle. - The sketch geometry extensions inside
GeoExtensions(such as construction and internal geometry flags), the attributes written byGeometryMigrationPersistenceExtensiononGeometry, and the saved forms of surface geometry types. - Properties defined only by other workbenches (TechDraw, FEM, CAM, BIM and so on) beyond the types above.
- Whether the
XLinkfilepath is stored relative to the linking document in a normal save.
Sources
- Property – FreeCAD wiki, the list of property types, read from the FreeCAD-documentation repository
- File Format FCStd – FreeCAD wiki, the example Document.xml
- Scripted objects – FreeCAD wiki: files never carry Python code
- FreeCAD source code – main branch:
src/App/PropertyStandard.cpp,PropertyUnits.cpp,PropertyGeo.cpp,PropertyLinks.cpp,PropertyExpressionEngine.cpp,PropertyPythonObject.cpp,PropertyFile.cpp,src/Base/Rotation.cpp,src/Base/Color.h,src/Mod/Part/App/PropertyTopoShape.cpp,PropertyGeometryList.cppandGeometry.cpp,src/App/ComplexGeoData.cpp,src/Mod/Mesh/App/MeshProperties.cpp,src/Mod/Sketcher/App/PropertyConstraintList.cpp,Constraint.cpp,Constraint.handGeoEnum.h