Query test editor
In the Edit Selection Test dialog, you can create and modify selection tests that an object must pass to be included in the query results.
Test Passed If
The two fields at the top of the Edit Selection Test dialog define how the test conditions are to be met.
- At least one condition is true: c1 OR c2 OR c3
- At least one condition is false: NOT (c1 AND c2 AND c3)
- All conditions are true: c1 AND c2 AND c3
- All conditions are false: NOT (c1 OR c2 OR c3)
Conditions In Test
To create a new condition for the current test, first specify the conditions in the condition fields and then click New.
To modify a saved condition, select the condition from the list, edit the condition fields as required, and then click Modify.
To delete a condition, select the condition from the list and then click Delete.
What property/attribute of the target to test
In a condition, an object property such as the name of the pipeline that the object uses is compared to a given value or values.
You can click Search attribute to find and select the attribute (tag) to use in the selection test. Alternatively, you can fill in the information manually:
- Source – Select the source of the property, such as "Object data (PM)".
- Class – Select a class that filters the properties of the selected source and only shows the applicable ones in the attribute list.
- Attribute – Select the attribute from the list, such as "Name of object’s pipeline".
How to test
In the How to test section you can select to a positive or negative (NOT) condition and the operator to use to test the selected property.
Note: If you have a condition where you test a property such as nominal size that is not defined for all objects, then the condition "Not equal to 100" selects also objects like walls and floors. This might not be what you intended. Use negative conditions only with properties that you know are defined for the objects that you intend to test.
Comparison operators:
When you select a property, the default comparison operator for that property is automatically selected, but you can also select another operator. The operators that you can use with a given property depend on the type of the property. For example, properties that relate to time only allow the operator to be either "In Between" or "Within the Last".
-
Less than – Value is less than the comparison value.
-
Less or Equal to – Value is less than or equal to the comparison value.
-
Equal to – Value is equal to the comparison value.
-
Greater or Equal to – Value is greater than or equal to the comparison value.
-
Greater than – Value is greater than the comparison value.
-
One Of – Value is one of the listed comparison values.
-
In Between – Value is between the given min and max comparison values.
-
Match One Of – Value matches one of the listed patterns.
-
Regex Pattern – Value matches the given regular expression pattern. For more information on standard regular expressions, see https://262.ecma-international.org/5.1/#sec-15.10 or https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions.
-
Within the Last – Value is within the given time, expressed as weeks, days, hours, and minutes.
Getting a sample for comparison
You can use the Get Sample By button to get the comparison values by picking the value from a Plant Modeller model object. Some properties also provide other methods: for example, you can select the System name from the System object browser.
Alternate dimensions can also be used instead of metric units:
If a request targets nominal size dimension for which no explicit alternate value is given, then a mapping from metric nominal size to inch based presentation is made, as specified in the table below:
millimeters | inches |
---|---|
6 | ⅛ |
8 | ¼ |
10 | ⅜ |
15 | ½ |
20 | ¾ |
25 | 1 |
32 | 1¼ |
40 | 1½ |
50 | 2 |
65 | 2½ |
80 | 3 |
90 | 3½ |
100 | 4 |
115 | 4½ |
125 | 5 |
150 | 6 |
200 | 8 |
250 | 10 |
300 | 12 |
350 | 14 |
400 | 16 |
450 | 18 |
500 | 20 |
550 | 22 |
600 | 24 |
650 | 26 |
700 | 28 |
750 | 30 |
800 | 32 |
850 | 34 |
900 | 36 |
950 | 38 |
1000 | 40 |
1050 | 42 |
1100 | 44 |
1150 | 46 |
1200 | 48 |
1300 | 52 |
1400 | 56 |
1500 | 60 |
1600 | 64 |
1700 | 68 |
1800 | 72 |
1900 | 76 |
2000 | 80 |
2200 | 88 |