Files
solidcraft/docs/book/src/guide/parameters.md
T
Nathan Daneandbherbruck a0c1a67220 Application bar and ribbon redesign (step 1 of #2016) (#2176)
* ui: spacing, radius and type tokens, per-tab accents, agent and on-accent tokens

* ui: per-tab accent behaviour and a larger application bar with a Start page button

* icons: silhouette master and flat assistant and agent link icons (open for review)

* icons: apply review notes (sparkle assistant, refined plug, silhouette halo)

* icons: wire the silhouette master to inspect.silhouette; record the accepted icons

* ui: application bar to the design: separators, Save, house, assistant icon, readable hovers

* ui: ribbon structure: Model to View tabs, contextual Sketch and Sheet Metal, migrated pins

* ui: ribbon painting to the compact design

* ui: smaller icon button highlight and assistant mark on the bubble corner

* ui: short ribbon labels that wrap at spaces

* ui: ribbon buttons fit their labels and Finish Sketch shows its full name

* ui: constraint gallery, workspace menu, section list headings and richer tooltips

* ui: lighter selected tab label, ribbon surface and dimmer bar separators match the dark design

* ui: document tabs as rounded chips with a dimmer inactive label

* ui: document tabs fit their names and show close only when active or hovered

* icons: close and plus masters for the document tabs (open for review)

* ui: centre the new-tab plus and overflow button on the bar

* ui: a quiet rule under the ribbon tabs on non-contextual tabs

* ui: the application bar mark separates its faces with the bar colour, not white

* ui: open ribbon section label uses the selected tint and a chevron

* ui: dim the tab close and plus icons until hovered

* ui: every ribbon dropdown uses the chevron, the workspace card included

* ui: the active document tab uses the design's surface colour

* ui: the bug button's right padding mirrors its icon side

* ui: square constraint cells and a rule before the grid

* ui: constraint cells back to their earlier size, keeping the rule

* ui: smaller constraint cells and icons, centred in the section

* ui: constraint cells fit the height of the large buttons' icon and label

* ui: sketch Create titles share the other labels' line

* ui: format the application bar and ribbon changes

* ui: active tab surface token and the colour and hover tests that follow the redesign

* tests: the merged parameter and narrow toolbar tests follow the compact ribbon

* i18n: the Malay Gap label has an English source and its Japanese and Chinese translations

* apply_off_thread tests: the evaluation lingers in tests, so still computing never depends on machine speed

---------

Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-10-20 17:23:49 +00:00

3.7 KiB

Parameters and expressions

Every dimension and feature input is a model parameter (d1, d2, …). User parameters are ones you add yourself, with a unit, an expression and an optional comment. Change them in Change Parameters (parameters.change). The timeline rebuilds from the first feature that uses them.

When creating or editing a sketch dimension, its value editor shows its model parameter name (d1, d2, …). Click another driving dimension to use its name: when the value is just a number (such as 10 or 10 mm) the name replaces it; otherwise it goes in at the cursor, replacing selected text and keeping what you typed, so typing 10 + and clicking d1 gives 10 + d1. Add arithmetic such as / 2 to build a dependent dimension. Press Enter to apply the expression or Escape to cancel the edit. Add and edit user parameters through the existing Change Parameters command.

In the MANAGE tab's PARAMETERS section, click Parameters to open the user and model parameter editor. The Configurations button in CONFIGURATIONS opens the configuration table; Configure remains in the dropdown for configuring columns.

Press Enter in the new parameter's name, expression or comment field to add it. Valid entries return focus to the name field for the next parameter; invalid entries remain editable. In expression fields, type a parameter or dimension name for autocomplete, or press Ctrl+Space to open suggestions, including in an empty field. Up/Down selects an autocomplete suggestion, Enter/Tab accepts it, and Escape dismisses the suggestions. Accepting a suggestion does not also submit the parameter.

Expressions are unit-aware: 2 * width + 5 mm, angle / 2, sqrt(area), 1 in + 3 mm, using + - * / ^, parentheses, sin cos tan asin acos atan atan2 sqrt abs min max floor ceil round mod trunc and unit conversion. A decimal comma works too, outside parentheses: 2,5 mm is 2.5 mm (inside a function's parentheses the comma separates its arguments, so write max(2.5, 3) there). A mixed number is one value, as imperial sizes are written: 2 1/8" and 3 7/16 in are 2.125 in and 3.4375 in (a whole number, a space, then a proper fraction of whole numbers). A length where an angle is expected (or the other way round) is an error, not a silent conversion. Cycles are reported with their path (a → b → a), renaming a parameter updates every expression, dimension and feature input that uses it, and a parameter in use can't be deleted (the error lists its users).

The design's units (Document Settings in the browser: mm, cm, m, in or ft) set how a bare number typed into a feature is read. In an inch design 2 means 2 in. The Box, Cylinder, Sphere, Torus and Coil dialogs start with their sizes in the design's units, unit shown (20 mm, 20 in). Changing the units never moves existing geometry. A size worked out from a bare number keeps the unit the number was given in: a sphere with a bare diameter of 20 has the radius (20 mm) / 2 in a millimetre design. Beside a unit-less expression such as 2 * 5 or a unit-less parameter, which is read in the design's units, the number stays bare and is read with it.

Parameters export to and import from CSV or JSON (parameters.export, parameters.import). Configurations (config.*) keep a table of rows, each with its own parameter values and suppressed features, physical materials and body appearances, switched with config.activate. The table's Library picker selects material or appearance values. Choose Follow material to clear an appearance override. Custom looks retain their colour and opacity across activation, undo and save/reopen. See configuration commands and examples.