For example:
An equipotential number coming from the database: 5
The variable EQU_NO stores this value.
If you want to present this information on your drawing as 005
(displayed with three characters), use the following formula: STRZ(VAL(EQU_NO), 3,
0)
Using Formula Management
The SOLIDWORKS Electrical Schematic
app has many
predefined formulas that you can use. However, if you need to create your own formula,
consider the following:
- A formula contains variables (available in the third tab) and text.
- Place text strings within quotes.
- Separate each variable or text string with a
+.
- For example:
CHAN_TYP + ":" + COM_VAL1 + "." + CHAN_ADDR
- The variables are generally of Text type, even when they have a
numeric appearance, such as the
EQU_NO variable, which sends the
equipotential number.
- You can use functions to work on a variable, such as the following:
STRZ (VAL(FIL_NO),2,0) sends the drawing number represented by
two characters. Zero (0) replaces the missing character here, for
example: 01, 02, ....
VAL converts a chain of characters into a number. Since
EQU_NO is a string of characters, it is transformed into a
number, because the function STRZ handles only numeric values.
STRZ converts a numeric value by imposing a certain number of
digits (2), and the number of decimals (0).
- You can use mathematical functions (
+ - * /) to modify the
result of the variables.
STRZ(VAL(EQU_NO)*2,3,0) sends the equipotential number
represented as three characters, but only using even numbers.
STRZ((VAL(EQU_NO)*2)-1,3,0) sends the equivalent of the
result of the previous formula, but only using odd numbers.
- The Variables with “ALWAYS” in their name, such as
BOOK_TAG_ALWAYS
are always displayed. For example, BOOK_TAG_ALWAYS provides the
bookmark for origin and destination arrows, even within the same book.
If you enter an invalid formula, a message appears at the bottom of the dialog box.
The list of variables used in the formula appears in the upper part of the dialog box.
Neutral values that you can change to look like the values used in your project appear next
to this list. The lower part of the dialog box displays the formula result with the values
used previously.