WireCAD Online Help:SysName Format
Command Line Shortcut: fsys User Permissions Level: sysNameFormatMasterCollection - AllowAddNew/AllowEdit/AllowDelete |
How it Works
The SysName format tool is used to generate regular expressions that are then used to parse SysName info as well as provide formatting information to masked text boxes.
A note on regular expressions: WireCAD v6 makes extensive use of regular expressions (Regex). Regular expressions are a well documented string parsing tool. Much has been written on them. It is not within the scope of this quick start guide to fully explain regular expressions; however, a google search will tell you more than you ever wanted to know.
Two forms of regular expression are generated: a simplified form that is used as a mask in both the Systems database and in textboxes, and a complex form that aids in the generation of queries to determine the next number in a sequence. The following are both the simplified and complex regex for the default format:
\w{1,6}-\d{1,5} (?<EQUIPMENTTYPE>\w{1,6})-(?<NUMERICSEQUENCE>\d{1,5})
Controls Explanation
Available Variables
Variable | Description | Sequencable | Default Format REGEX |
---|---|---|---|
MANUFACTURER | The Manufacturer Name from the global Manufacturers database | X | \w{1,6} |
EQUIPMENTNAME | Equipment Name/PN/Model Number | X | \w{1,6} |
DESCRIPTION | The device description as contained in the global equipment library | X | \w{1,6} |
EQUIPMENTTYPE | The Equipment Type as contained in the global equipment library | X | \w{1,6} |
LOCATION | The location typed in the SysName edit dialog. | X | \w{1,6} |
ELEVATION | The elevation typed in the SysName edit dialog | X | \w{1,5} |
STRING | any string (usually used for delimiters like dashes (-)) | any string (usually used for delimiters like dashes (-)) | |
ALPHASEQUENCE | an alpha sequence that starts at the letter 'a' | X | \w{4} |
NUMERICSEQUENCE | a numeric sequence that starts with the project starting number | X | \d{1,5} |
USER1 | the global equipment library device definition user1 field | X | \w{1,6} |
USER2 | the global equipment library device definition user2 field | X | \w{1,6} |
USER3 | the global equipment library device definition user3 field | X | \w{1,6} |
USER4 | the global equipment library device definition user4 field | X | \w{1,6} |
More About Regex
The Format field uses regular expressions. The following are some simple examples:
Expression | Description |
---|---|
\w* | Any non number, non punctuation string any length |
[a-zA-Z0-9]{5} | Lower / Upper case and 0 thru 9 exactly 5 characters |
\d{1,5} | Digits 1 to 5 digits in length |
\d* | Digits any length |
\\ | a slash "\". The \ is the escape character so you need two |
[a-zA-Z0-9_\-\,]{1,4} | Lower / Upper case, 0-9, underscore, dash, and comma. |