Drawing Import Name Mapping Formulas
Name mapping formulas are used in the Standard Name Mapping Edit Window and the Conversion Name Mapping Window. The syntax for these formulas is similar to the syntax used in Excel or other spreadsheet applications. The major difference is that instead of using cell numbers as operands, Dimension Import uses a limited number of operands that relate to the properties of individual drawings and/or user input during conversion in the Drawing Conversion Window.
Several drawing property operands are related to the drawing sequence number. Each drawing is assigned a sequence number when it is added to the Drawing List Window. The sequence number can be reset after sorting the list or moving individual drawings.
Operand | Description |
---|---|
Drawing Property Operands | |
BiSequence | The drawing sequence number with a leading zero if it is less than 10 (01, 02, ..., 10, 11, ..., 100, 101, etc.). |
Folder | The sub-folder of the original document. Sub-folders are only defined for documents that are added to the drawing list by selecting a folder. The sub-folder is the sub-folder of the document within the selected folder. |
Name | The filename of the original document (without the folder or the extension). |
QuadSequence | The drawing sequence number with leading zeros to pad it to 4 characters (0001, 0002, ..., 0010, 0011, ..., 0999, 1000, 1001, etc.). |
Sequence | The drawing sequence number (1, 2, ..., 10, 11, ..., 100, 101, etc.). |
TriSequence | The drawing sequence number with leading zeros to pad it to 3 characters (001, 002, ..., 010, 011, ..., 099, 100, 101, etc.). |
Input Field Operands | |
Discipline | The value of the Discipline input field. This is usually the construction discipline such as "Architectural", "Electrical", etc.. |
Location | The value of the Discipline input field. This is usually the physical location such as "Building 1", "Building 2", etc.. |
Prefix | The value of the Prefix input field. This can be used in a variety of ways to insert a common prefix before groups of drawings. |
UserInput | The value of the User Input input field. This is usually the drawing title. This input field is cleared for each new drawing. |
Version | The value of the Version input field. This is usually the drawing version such as "Addendum 1", "Addendum 2", etc.. |
Dimension formula operands also include numeric literals (1, 2.3, 7, etc.) and string literals. String literals can be enclosed in single quotes ('ABC') or double quotes ("XYZ").
Operands are combined using operators and/or functions. The table below shows the operands and functions supported:
Operation | Priority | Description |
---|---|---|
Text Operators | ||
& | 4 | Concatenate text |
\ | 4 | Concatenate text with a backslash(\) in between |
Math Operators | ||
+ | 4 | Add |
- | 4 | Subtract |
- | 6 | Unary minus |
* | 5 | Multiply |
/ | 5 | Divide |
Logical Operators | ||
= or EQ | 5 | Equal to |
>= or GE | 2 | Greater than or equal to |
> or GT | 2 | Greater than |
<= or LE | 2 | Less than or equal to |
< or LT | 2 | Less than |
<> or EQ | 2 | Not equal to |
AND | 1 | Both conditions true |
OR | 1 | One or more of the conditions true |
Functions | ||
Abs(N1) | 7 | Absolute value of N1 |
And(C1,C2) | 7 | If C1 and C2 are both true, returns true, Otherwise returns false |
ArcCos(N1) | 7 | Angle (in degrees) whose cosine is N1. |
ArcSin(N1) | 7 | Angle (in degrees) whose sine is N1. |
ArcTan(N1) | 7 | Angle (in degrees) whose tangent is N1. |
Ceiling(N1,N2) | 7 | Returns the next value equal to or greater than N1 which is a multiple of N2. If N2 is omitted, returns the next whole number equal to or greater than N1. |
Char(N1) | 7 | Character whose ASCII value is N1 |
Clean(S1,S2) | 7 | Modify string S1 based on
the characters found in string S2. S2 may be one of more of the following: B - Remove beginning spaces E - Remove ending spaces L - Convert to lower case S - Remove all spaces U - Convert to upper case |
Cos(N1) | 7 | Cosine of N1 degrees |
DateTotDays(N1) | 7 | returns the date which is N1 days after December 31, 1969 |
Day(D1) | 7 | Returns the day of the month for date D1. D1 should be of the form YYYYMMDD. |
Floor(N1,N2) | 7 | Returns the next value less than or equal to N1 which is a multiple of N2. If N2 is omitted, returns the next whole number less than or equal to N1. |
Frac(N1) | 7 | Fractional part of N1 |
If(C1,X2,X3) | 7 | If C1 is true, returns X2. Otherwise returns X3. |
Int(N1) | 7 | Whole number part of N1 |
InStr(S1,S2) | 7 | Search string S2 for sub-string S1. Returns the starting position or zero if not found. |
Len(S1) | 7 | Length of S1 (in characters). |
Mid(S1,N2,N3) | 7 | Returns part of string S1, starting with character position N2, for N3 characters. If N3 is omitted, returns all characters starting with position N2. |
Month(D1) | 7 | Returns the month of the year for date D1. D1 should be of the form YYYYMMDD. |
Not(C1) | 7 | Returns true it C1 is false, false if C1 is true |
Or(C1,C2) | 7 | If either C1 or C2 is true, returns true, Otherwise returns false |
Round(N1,N2) | 7 | Round N1 to N2 decimal places. |
Sin(N1) | 7 | Sine of N1 degrees. |
Sqrt(N1) | 7 | Square root of N1. |
Ssplit(S1,N1) | 7 | Returns the N1 value in the S1 string of semicolon separated values. So Ssplit("first;second;third", 2) would return "second". |
Tan(N1) | 7 | Tangent of N1 degrees. |
Today() | 7 | Returns todays date (yyyymmdd). |
TotDays(D1) | 7 | Returns number of days between December 31, 1969 and date D1. D1 should be of the form YYYYMMDD. |
Year(D1) | 7 | Returns the four digit year for date D1. D1 should be of the form YYYYMMDD. |
YYMMDD(N1,N2,N3) | 7 | Returns the date for year N1 (2 digit or 4 digit), month N2 and day N3. |
Each operand has a Priority (shown in the second column above). Higher priority operations are performed first. Equal priority operations are performed left-to-right. Parentheses can be used to override priorities. The table below shows an example where multiplication is a higher priority that addition:
Formula | Result |
---|---|
1 + 2 * 3 + 4 | 11 |
(1 + 2) * (3 + 4) | 21 |