Translations:Expressions/14/en
The following table shows some more examples:
CAD data | Call in expression | Result |
---|---|---|
Length of a Part Box | Box.Length
|
Length with units (mm) |
Volume of the Box | Box.Shape.Volume
|
Volume in mm³ without units |
Shape type of the Box | Box.Shape.ShapeType
|
String: Solid |
Label of the Box | Box.Label
|
String: Label |
X-coordinate of center of mass of the Box | Box.Shape.CenterOfMass.x
|
X-coordinate in mm without units |
X-coordinate of the Box placement | Box.Placement.Base.x
|
X-coordinate with units (mm) |
X-component of the rotation axis of the Box placement | Box.Placement.Rotation.Axis.x
|
X-component of the unit vector in mm without units |
Rotation angle of the Box placement | Box.Placement.Rotation.Angle
|
Rotation angle with units (deg) |
Full Box object | Box._self
|
Object of type <Part::PartFeature> |
Value of constraint in a sketch | Constraints.Width
|
Numeric value of the named constraint Width in the sketch, if the expression is used in the sketch itself.
|
Value of constraint in a sketch | MySketch.Constraints.Width
|
Numeric value of the named constraint Width in the sketch, if the expression is used outside of the sketch.
|
Value of a spreadsheet alias | Spreadsheet.Depth
|
Value of the alias Depth in the spreadsheet Spreadsheet
|
Value of a local property | Length
|
Value of the DataLength property in e.g a Pad object, if the expression is used in e.g DataLength2 in the same object. |