The general syntax for symbolic expressions is the following:
$sym{name[(n)|(n1:n2)][:option(option_value)][="default description"]}
|
|
where:
- All parts in bold — such as $, { , are invariant (required and not to be modified)
- [item] (brackets) indicate item is optional
- | (pipe) indicates an alternative (a|b means a is alternative to b)
and:
sym |
is the symbol identifier. A list of all the available identifiers is provided in "Available Symbolic Expression Identifiers" |
name |
is the name of the user defined property to be displayed. |
n or n1, n2 |
are indexes available only for use with integer/real array variables |
option |
is one of the following options:
F |
to indicate a C-like format in the option_value with the following conventions:
|
F("#date(date format)") |
applied to a string property, assumes it is a date and formats it as indicated by the date format expression inside parentheses.
Have a look at the list of valid date formatting codes you can use.
The property can contain a date in any format allowed by the current settings of the Start Control Panel Regional settings Date tab of your Microsoft® Windows environment.
For example: If the property "mydate" has been defined, assigned to the drawing and its value is 11/23/99, you can create a string like the following: $M{mydate:F("#date(%d-%B-%Y)")} and this will display the date: 23-November-1999. |
F("#clear(mask)") |
conventional format for blanking: if the result matches the mask, the string is blanked. You can use the @ wildcard, in the place of any number of any character.
This option can be useful, for example, to blank the string showing a number, when it has a certain value.
Suppose you have defined an integer property "servicecode" and assigned it to the model with the (n) value. You can decide not to display your service code when its value is zero. You just have to create a text string like the following: $M{servicecode:F("#clear(0)"}. The service code will be displayed whenever it is not zero, but not when it is zero. |
Fnum |
to refer to global logical formats, where num can be one of the following:
0 |
number of decimal places contained in output data on the User Interface |
11 |
number of decimal places in dimensions; specifying a negative value automatically eliminates insignificant digits. |
12 |
number of decimal places in dual dimensions; specifying a negative value automatically eliminates insignificant digits. |
13 |
number of decimal places in dimension tolerances; specifying a negative value automatically eliminates insignificant digits. |
14 |
number of decimal places in tolerances of dual dimensions; specifying a negative value automatically eliminates insignificant digits. |
|
F("%.numf") |
to format the number of characters to be displayed after decimal for a value of type: floating or double; where num is the number of decimal digits you want to have. For example, $M{mydimension:F("%.3f")} will display dimension values with three digits after the decimal, 25.055 mm |
S |
to be used only with the symbolic expression QSM{name}, searches name within the assembly hierarchy. option_value follows these conventions:
S(#,#) |
A couple of integer numbers separated by a comma specify the search target assembly levels and the search order left to right. The numbers may be:
- 0 — to represent the top level of the assembly;
- -1 — to represent the bottom level of the assembly;
- -2 — to represent the entities within the top or bottom level components, whether visible or not;
- a positive number — to represent a specific level from the top.
Examples |
:S(-1,0) |
the search for the property starts from the lowest level component (-1) and continues upwards (0). |
:S(1,1) |
the search for the property is limited to the components at the first level from the top. |
:S(1,-2) |
the search for the property starts from the components at the first level from the top (1) and continues to the lowest level entities contained in the bottom level components (-2). |
:S(0,-2) |
the search starts from the top level (0) and continues to the lowest level entities contained in the bottom level components (-2). Note that in this case the property may be found even in top level entities not contained in any component. |
|
|
|
default description |
is the string that will be displayed when the Symbolic text expansion check box in the Symbolic Texts area of the Text category in the Document Properties is not selected. If the default description is omitted, when the symbolic text expansion is not active, the string which describes the notation will be displayed (for example, if you have an "int_diameter" variable, when the symbolic text expansion is active, the symbolic text $V{int_diameter} will display the value of the variable; on the contrary, if the symbolic text expansion is not active and no default description is defined, the $V{int_diameter} string itself will be displayed; in the same situation, if an "internal diameter" default description was defined, "internal diameter" would be displayed) |
|