Expressions and Configurator
The Expressions dock tab, under its Expressions / parameters heading, holds named numeric
values that feature inputs can reference instead of raw numbers. It edits the history's
expression source and shows two read-only views beneath it:
Variableslists the assignments parsed from the source.Configurator (read-only)shows the history's configurator object as formatted JSON.
Expressions
Write assignments in the editor, then use the names in numeric feature inputs. For example:
wall = 2;
width = 80;
height = width * 0.6;
innerWidth = width - wall * 2;
A feature input can then contain width, height, or another numeric expression such as
width - wall * 2.
Click Apply (re-run history), or leave the editor, to commit. A real change re-runs the
history up to the current rollback point; committing unchanged text does not start a run. When the editor is not focused,
it follows document changes made by open, new, undo, or redo.
The Variables table shows each valid name = expression assignment in source order. Its
right column is the defining expression, not the evaluated numeric result. Assignment names
use letters, numbers, _, and $, and cannot begin with a number.
The expression evaluator supports numeric arithmetic, parentheses, earlier variables,
configurator.field member access, and its supported Math.* functions. Numeric literals
in feature fields continue to work even if the expression source contains an error; a
feature that tries to evaluate an expression reports the environment error.
Configurator
Configurator editing and generated controls are not implemented in the current panel. Open
Configurator (read-only) to inspect the object saved in the history document. The panel
does not provide Edit Configurator, Add Widget, sliders, dropdowns, or other live fields.
Numeric configurator values are available to expressions as:
configurator.fieldName
If the object contains a values object, that nested object supplies the fields; otherwise
the top-level object does. Numbers, numeric strings, and booleans can be converted to numeric
expression values. Other values are omitted, and reading one reports that
configurator.<field> is not a number.
Template Inputs
While a template (.tbrep) is open, the pane shows a Template inputs list under the
variables. Tick an expression to make it an input that the insert prompt asks for. A ticked
input takes an optional label, minimum, maximum and comma-separated list of choices. Each
change is one undoable edit, saved with the template. See
Families and Templates.
Saved With the Part
The expression source and configurator object are fields of the part's history document. Expression edits participate in undo and redo and are retained when that history is saved and loaded.