In the variables editor the new variable can be created by using the New Variable command :
<Ctrl>+<N> |
Variable > New |
The New Variable command can be also called from the contextual menu, which appears upon pressing at any place of the list of variables in the editor and the Variables window.
After calling this command, the parameters dialog of the variable being created appears. For creating a variable it is necessary to define name, type (numeric or text), and expression, which defines the value of the variable. Other parameters are optional. After pressing OK the created variable appears in the list of variables.
Rules of defining names and expressions of variables are described in the Parameters of Variable section.
Besides the use of the aforementioned method, it is possible to create a new variable by other means. It is enough to put the name of yet non-existing variable into an expression of some variable or into an input box of some parameter of a drawing/3D model element. After attempting to calculate the given expression the system will find that such variable has not been defined, and a message will pop up on the screen: “Create variable?”. In case of positive answer, the creation of the new variable with the given name will be launched and the parameters dialog of such variable will appear. In case of a negative answer, the new variable is not created and the error message is generated.
If you enter a construction like variable_name=number (for real variable) or $variable_name=text (for text variable) into an input box of some parameter of a drawing/3D model element, the system will automatically use the value after the "=" symbol as variable expression and create the variable using default parameters without opening the variable parameters dialog.
See Also: