Gets the specified number from within the owners name.
The maximum integer that can be extracted from an owner is 253 (9007199254740992).
MyNumber([Index])
Where:
Index (optional) is the index specifying which number to return.
The table below shows the result of the MyNumber function when applied to a Variable that includes a number in its name.
Owners Name | Rule | Result |
---|---|---|
DWVariableMyVar123Test45Test6 | MyNumber(1) | 123 |
DWVariableMyVar123Test45Test6 | MyNumber(2) | 45 |
DWVariableMyVar123Test45Test6 | MyNumber(3) | 6 |
DWVariableMyVar123Test45Test6 | MyNumber(-3) | 123 |
DWVariableMyVar123Test45Test6 | MyNumber(-2) | 45 |
DWVariableMyVar123Test45Test6 | MyNumber(-1) | 6 |
Please note how the index of the number can be supplied by a positive and negative value.
Numbers are treated as multi digit values if adjacent to one another.
The table below shows the result of the MyNumber function when applied to various Model Rules.
Owners Name | Rule | Result |
---|---|---|
Assem1\Part35A\Name
(This owners name is typically the File Name parameter of a captured model.) | MyNumber(2) | 35 |
Assem1\Part35A\Name
(This owners name is typically the File Name parameter of a captured model.) | MyNumber(-2) | 1 |
Assem1\Part35A-4 (This owners name is typically the Instance number of a captured instance.) | MyNumber(-1) | 4 The first number from the right of the owners name. |
The function Indirect can be used to build an owners name to return its result.
The function MyName will return the name assigned to the owner of the rule.