Block UI Styler > Block Catalog > Numbers
Expression
An expression allows values and formulas to be captured, modified and referenced. Expressions allow the creation and manipulation of parametric relationships.
The expression must be a number, and the application must create and set a number-valued expression into the block during the initialize callback.
Note: The Expression block works only with an expression of type Number.
This is what differentiates it from the plain Double block: it creates an expression parameter which can be linked to other expressions or measurements, and gives access to the Expression Editor through the DesignLogic presentation.
Inherited general properties
- BlockID
- Enable
- Group
- Label
- Show
- Expanded
Block-specific properties
| Property Name | Description | Access | Property Type | List of Values |
|---|---|---|---|---|
| BalloonTooltipText / BalloonTooltipImage / BalloonTooltipLayout | Standard balloon tooltip text/image/layout properties (see other blocks for full value lists). | CIGS | String/String/Enum | — |
| Dimensionality | Specifies the type of quantity that the expression represents (e.g., Length, Angle, Energy). Determines the set of unit options available for the quantity (e.g., for Length: mm, in; for Angle: degrees, radians). | CIG | Enum | Any value in the Dimensionality enumeration. |
| ExpressionObject | Specifies the Expression object tied to the block. User inputs to the block are written to the Expression object. | IG | TaggedObject | Object of type NXOpen.Expression. |
| Formula | Specifies the formula for the expression, e.g. sin(30). |
CSG | String | Any string representing a valid formula. |
| HasUnitsMenu | Relevant only when Dimensionality is set to a value that has units. Specifies whether to show a menu that permits the user to change units. |
CIG | Logical | True — shows the units menu. False — does not show it. |
| Units | An object representing the units for the expression. | I | TaggedObject | Object of type NXOpen.Unit. |
| Value | Specifies the expression value. Note: When Dimensionality is set to a unit, accessing Value through automation always returns the value in base part units, irrespective of the display units. Example: if the base part is metric and the Expression block's display unit is tonne (t), entering 50 into the block returns 50000 via automation (i.e., in kilograms). |
CSG | Double | Any value. |
| WithScale | Specifies whether the slider bar is available on the block. | CIG | Logical | True — shows the slider bar. False — hides the slider bar. |
| LimitCheckTolerance | Specifies the tolerance value used when checking limits for MaximumValue/MinimumValue equality. |
CSG | Double | Any value >= 0.0 used to determine equality with the limits. Any value < 0.0 means the system default tolerance is used (default is -1). |
| MaximumValue | Specifies the maximum allowed value. Values greater than this are invalid; equal is valid if MaxInclusive is True. |
CSG | Double | Any value. |
| MaxInclusive (inferred pairing, consistent with Integer/Double blocks) | See MaximumValue. |
SG | Logical | TRUE/FALSE. |
| MinimumValue | (Analogous minimum-value property; documented alongside MinInclusive below.) |
CSG | Double | Any Double value. |
| MinInclusive | See MinimumValue. |
CSG | Logical | True — an input value exactly equal to the minimum is valid. False — it is invalid. |
| PageIncrement | Specifies the value by which to increment the scale when pressing Page Up/Page Down. | CSG | Double | Any integer value less than MaximumValue. |
| LineIncrement | Specifies the value by which to increment the scale when pressing the Left/Right arrow keys. | CSG | Double | Any integer value less than MaximumValue. |
| AdaptiveScaleLimits | Specifies whether the scale should be adaptive. | CSG | Logical | TRUE — use Adaptive Scale. FALSE — do not use Adaptive Scale. |
| RetainValue | Determines if the block's value is saved in dialog memory (upon OK, Apply, or Close). | CSG | Logical | TRUE — retains the previous value. FALSE — does not retain. |
| RetainUnits | Determines if the block's units are saved in dialog memory (upon OK, Apply, or Close). | CSG | Logical | TRUE — retains the previous unit. FALSE — does not retain. |
Access column legend
| Character | Stands for | Meaning |
|---|---|---|
| C | Creation | Modifiable interactively in Block UI Styler at design time. |
| I | Initialize | Modifiable at run time via NXOpen API, but only during the Initialize callback. |
| G | Get | Readable via NXOpen API in any callback. |
| S | Set | Modifiable at run time via NXOpen API in any callback. |
Related Numbers blocks
Integer, Double, Linear Dimension, Angular Dimension, Radius Dimension, On Path Dimension, Integer Table, Double Table.
Linear Dimension, Angular Dimension, and Radius Dimension are all special cases of the Expression block (their Dimensionality is fixed to linear length, angular, and radius respectively).
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.blockstyler/bs_expression · retrieved 2026-07-07