Std VarSet |
Menu location |
---|
None |
Workbenches |
All |
Default shortcut |
None |
Introduced in version |
1.0 |
See also |
Spreadsheet Workbench, DynamicData Workbench |
The Std VarSet command creates a VarSet. A VarSet is a set of properties that can be used as variables in expressions.
The Add a property dialog box
A
to Z
, a
to z
, 0
to 9
and _
) are allowed.FreeCAD supports many property types. The table below lists some of the most common types. See FeaturePython Custom Properties for more information.
Property type | Default unit (if any) | Remark |
---|---|---|
App::PropertyAngle |
° (or deg) | |
App::PropertyBool |
true or false , can be used in conditional expressions
| |
App::PropertyDistance |
mm | |
App::PropertyFloat |
Decimal number | |
App::PropertyInteger |
Whole number | |
App::PropertyLength |
mm | Similar to App::PropertyDistance but cannot be negative
|
App::PropertyString |
Text string |
App::PropertyEnumeration
property. This can be done via Python code or in the Property editor. The steps for the latter option are:
import FreeCAD as App
doc = App.ActiveDocument
var_set = doc.addObject("App::VarSet", "VarSetName")
var_set.addProperty("App::PropertyInteger", "MyNumber") # Property is added to the Base group.
var_set.MyNumber = 123
var_set.addProperty("App::PropertyString", "MyText", group="SomeGroup", doc="Some tooltip information")
var_set.MyText = "Abc"
doc.recompute()