You can create new parameters from expressions or parts of expressions in text fields and table cells in the Model Builder. To do so, first select the part of the expression that you want to use to define a new parameter. Then right-click and choose Create Parameter (

). If you do not select any part of the text field or table cell, the entire content becomes the expression for the new parameter in the
Create Parameter window that opens. In that window, specify the name of the new parameter in the
Name field. The
Expression field contains the expression that was selected in the text field or table cell, but you can change it if needed. Add a description in the
Description field if desired.
If there are more than one Parameters group node in the model, choose which one to add the new parameter to from the
Parameter group list. Also, geometry parts can have a
Local Parameters parameter group node. When such a node is present and the text field or table cell belongs to a feature in a geometry part, the
Local Parameters parameter group also appears in the
Parameter group list. Likewise, under
Results, it is possible to add a
Parameters group node for result parameters. When such a node is present and the text field or table cell belongs to a results feature, the
Parameters group under
Results also appears in the
Parameter group list.
Click OK to add the parameter to the chosen parameter group. To add the new parameter, it must have a name that is valid, unique within its context, and that is not a reserved name such as
pi. Also, the expression must be possible to evaluate.
If the expression has an inconsistent unit, it appears in orange. If there is a syntax error, the expression appears in red. The latter can occur also when the expression is taken from a variable definition, for example, and include a variable such as x, which is defined as a field in the geometry. For example, from an expression
x+pi+3+a2, the part
pi+3+a2, where
a2 is the name of another parameter, can be used to define a new parameter, whereas all of
x+pi+3+a2 gives a syntax error (
x is an unknown model parameter). When an expression appears in orange or red, hover over the expression to get some more information about the warning or error.
If you right-click in a text field or table cell with a parameter or with a selected parameter in an expression, you can choose Edit Parameter (

) to open an
Edit Parameter window where you can edit the parameter’s settings in the
Name,
Expression, and
Description fields. Next to
Value, the updated parameter value appears. Click
OK to save the updated parameter definition.