Expressions
Motion Analyst entities support expressions.
- Parametric expressions
- Solver expressions
Entry fields for Motion Analyst entities, such as points, bodies, bushings,
spring-dampers, forces, and others, can contain expressions. These fields are available
in the Property Editor, guide panels, or microdialogs, and are often marked with a curly
bracket icon
.
Parametric Expressions
Parametric expressions are used to relate the value of one modeling entity to another within the model.
The data type returned by a parametric expression must match the data type of the field it defines.
You can also use the mathematical operators and functions available in the Templex text and numeric language when creating parametric expressions.
Parametric expressions are supported in entry fields of type Constant and Expression.


Example
Consider two points in a model with variable names Point_1 and Point_2. To position Point_2 so that its X location is 10 units away from the X location of Point_1, you can use a parametric expression.
The parametric value of the X coordinate for Point_1 is represented by the data member x, which is accessed using the expression Point_1.x. Therefore, to place Point_2 10 units from the X location of Point_1, enter the following expression in the X coordinate field of Point_2:
Point_1.x + 10
This ensures that Point_2 is positioned parametrically relative to Point_1, maintaining a consistent offset even if Point_1 moves.

Solver Expressions
Solver expressions define linear or nonlinear values that depend on time or solver state for entities such as bushings, spring-dampers, force vectors, and motions.
These expressions might combine unevaluated strings with evaluated parametric expressions.
During runtime, Inspire converts solver expressions into functions compatible with the solver.
Solver expressions are supported in entry fields of type Expression only.
Follow these rules to write solver expressions:
- Enclose the entire solver expression in back quotes
`…`. - Enclose parametric expressions inside the solver expression in curly
brackets
{…}.
Example
Consider a force whose magnitude ramps from zero at 1 s to 500 times the distance between two markers at 1.5 s using a step function. You can define this nonlinear value using the following solver expression:
`STEP( TIME, 1, 0, 1.5, 500*DX( {Marker_1.idstring} , {Marker_2.idstring} )
)`
According to the rules for evaluating solver expressions, Inspire first evaluates Templex values within curly brackets, ignoring all other text in the function. In this example, the parametric variables Marker_1.idstring and Marker_2.idstring return the IDs of the marker entities Marker_1 and Marker_2 as strings. Therefore, when Inspire passes the expression to the solver, it becomes the following (assuming the marker IDs are 30102010 and 30102011, respectively):
`STEP( TIME, 1, 0, 1.5, 500*DX( 30102010 , 30102011 ) )`
Units
Parametric expressions have their own units, and any expression you enter assumes those units.
Expressions are evaluated in expression units but displayed in display units.
Solver expressions are passed to the solver as strings without unit conversion and are solved in solver units. However, if a solver expression includes parametric expressions, those parametric expressions are evaluated first in expression units before being combined with the remaining solver expression and sent to the solver.
You can change the expression units under .

Example
Consider a non-linear spring-damper model that uses Expression units of MMKS, while the display units and solver units are in MKS.

The other end of the spring damper End Point 2 is created 0.5 m in the Z direction
from End Point 1. This is achieved by using a parametric expression
p_end1.z+500. The value 500 is used instead of 0.5 because the
Analyst Expression units chosen are MMKS, so the expression must be entered based on
MMKS units.

The spring damper force, due to stiffness, is defined using a spline, for which the independent variable is a solver expression that measures the displacement of the spring from its modeled position. The expression is as follows:
`{CoilSpring.len/1000} - {CoilSpring.DM}`

In this case, CoilSpring.len is an analyst parametric expression
referring to the installed length of the spring damper. Its evaluated value is in
Expression units. This expression needs to be scaled to convert it to the solver
units (MKS).
Expression Builder
The Expression Builder lets you enter expressions in text boxes efficiently, reducing the need for extensive typing or memorization.

Add an Expression
Follow this workflow to add an expression using the Expression Builder tool.
-
On the field entity, click the
icon.
- Optional:
Add a solver or mathematical function.
-
In the Expressions section, type mathematical equations or expressions.
Note: You can combine typed expressions with inserted functions. Functions are added at the cursor’s current position.
- Optional: Select Evaluate to preview the result.


