Std Crea insieme di variabili |
Posizione nel menu |
---|
Nessuno |
Ambiente |
Tutti |
Avvio veloce |
Nessuno |
Introdotto nella versione |
1.0 |
Vedere anche |
Spreadsheet, DynamicData |
Il comando Crea insieme di variabili crea un VarSet. Un VarSet è un insieme di proprietà che possono essere utilizzate come variabili nelle espressioni.
La finestra di dialogo Aggiungi una proprietà
A
a Z
, da a
a z
, da 0
a 9
e _
) sono consentiti.
FreeCAD supporta molti tipi di proprietà. La tabella seguente elenca alcuni dei tipi più comuni. Vedere Proprietà personalizzate FeaturePython per ulteriori informazioni.
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
. Questo può essere fatto tramite Codice Python o nell'editor Proprietà. I passaggi per quest'ultima opzione sono:
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()