Write a value, step by step
- Choose the Value cell of a rule, or of the top row. It opens a kind of value and the value on one line.
- Choose the kind in the list: Equals, One of, Starts with, Contains, Pattern, Between or Length. Each is explained below.
- Read the few lines at the foot of the cell, on a light blue box: what the kind means, examples of a value that passes and one that fails, and a link to this page. They open each time and follow the kind you choose. The round (i) at the end of the value's line closes them.
- Type the value. Empty means Any value. Whether the property must be there at all is the Need cell's: Required, Optional or Not allowed.
The kinds of value
Each example is a value as you type it, then a value in the model that passes and one that fails.
| Kind | Typed | Passes | Fails |
|---|---|---|---|
| Equals: exactly this value | EI60 | EI60 | ei60, EI 60 |
| One of: any one of the list | EI30, EI60, EI90 | EI60 | EI45 |
| Starts with: text that begins with it | EI | EI60 | REI60 |
| Contains: text with it anywhere | 60 | REI60 | EI90 |
| Pattern: the whole value matches the pattern | EI[0-9]+ | EI120 | EI 60 |
| Between: a number from one end to the other | 2 to 5 | 3.5 | 6 |
| Length: how many characters the value has | exactly 6 | AB-102 | AB-12 |
- Capitals count. Text values are compared letter for letter, so
EI60is notei60. To take both, use a pattern (below). - One of takes its values with commas or new lines between, and a bar between works too. A value that holds a comma goes in quotes: "Concrete, C30/37", Steel is two values. A comma with a digit on each side is a decimal comma when the number has no other comma, so 2,5, 3,5 is two numbers, while 30,60,90 is three. The line under the field says it in short: Commas or new lines between; "A, B" is one value. When it reads a decimal comma, the line says so, with how to write two values instead. In the test grid the field takes several lines: Enter is Done, and Shift and Enter start a new line.
- Starts with and Contains are written into the IDS as patterns, so another tool shows them as a pattern.
- Between includes both ends: on
2 to 5, 5 passes. Tick Exclusive ends to leave the ends out, and 5 fails. Leave one end empty for at least or at most: from 2 alone passes 10 and fails 1.5. A length is typed in millimetres and written in metres, as IDS asks:900 to 1200on a length passes a wall 1000 mm long in a model in millimetres, and fails one 1500 mm long. - Length counts every character, spaces too: exactly 6 passes
AB-102. From 3 to 12 passesEI60and failsEI.
Data types
A value always goes with a data type, and the check tests both: a rule that asks for IFCLABEL with Equals EI60 fails a property that holds EI60 as IFCTEXT. The Data type cell starts at Automatic: the type the loaded model uses for that property, else the type of the standard property set, else one read from the value itself.
- Text (
IFCLABEL,IFCTEXT,IFCIDENTIFIER): Starts with, Contains, Pattern and Length are for text. - Numbers (
IFCINTEGER,IFCREALand the measures such asIFCLENGTHMEASURE): Equals3onIFCINTEGERpasses 3 and fails 4, and Between takes a range. A decimal comma is fine as you type: it is written as a dot. - Yes or no (
IFCBOOLEAN) takes only Equals, with Yes or No. The IDS getstrueorfalse.
Write a pattern
A pattern in IDS is a regular expression in the form XML Schema defines, and it always has to match the whole value. EI[0-9]+ passes EI60 and EI120, but fails EI and EI 60: the space is not a digit. These are the parts you need most:
[0-9]is one digit,[A-Z]one capital letter,[^ ]any character but a space,.any character.+is once or more,?once or not at all,{3}exactly three times.(30|60|90)is one of the three.[.]is a dot itself: a dot alone stands for any character.
Patterns that work, each tested on the values beside it:
B-[0-9]{3}: three digits after B-. PassesB-102, failsB-12andB-1024.EI(30|60|90): passesEI30andEI90, failsEI45.R?EI(30|60|90): the R may be there or not. PassesEI60andREI60, failsEW60.[A-Z]{2}-[0-9]{3}: two capitals, a hyphen, three digits. PassesAB-102, failsab-102andAB-12.[Ee][Ii][0-9]+: any mix of capitals. PassesEI60,ei60andEi60, failsFI60.[^ ]+: no spaces. PassesEI60, failsEI 60.[0-9]+[.][0-9]{2}: a number with two decimals and a dot. Passes12.50, fails12,50and12.5..+: any value, as long as it is not empty. Passesx, fails an empty value.
What a pattern cannot do
The editor checks a pattern as you type it, and marks what IDS does not take:
^EI[0-9]+$: no ^ or $ is needed, since a pattern always matches the whole value, and other tools may read them as characters. The editor warns and offers to take them out.(?i)ei60: there is no switch for capitals. Write both, as[Ee][Ii][0-9]+.EI(?=60),EI.*?and\bEI: looking ahead, the shortest match and word edges are not part of XML Schema's patterns. The editor marks them as an error.EI\d+: tools disagree on what \d takes, any digit of any script or only 0 to 9. The editor warns and offers[0-9].(EI[0-9]+)+: a repeat around a repeat. The check engine will not run it, so the editor marks it as an error.
What IDS 1.0 cannot say
- Anything but a value. There is no "not equal to": list the values that are allowed, with One of or a pattern.
- One property against another, such as a height greater than the width, or a sum of values.
- Either of two properties. A rule cannot say "this property or that one": each rule asks for its own property.
- Capitals ignored, except by writing both in a pattern.
To give one test to many properties at once, see How do I test many properties?.