Query test editor

In the Edit Selection Test dialog, you can define a selection test that objects must pass to be included in the query results.

Test Passed If

Specify how the selection test should evaluate the conditions listed in the Conditions In Test pane.

Logical operator

Logical expression

Selects objects if…

 

At least ONE condition is true

At least one condition is true: c1 OR c2 OR c3

NOT

At least ONE condition is true

At least one condition is false: NOT(c1 AND c2 AND c3)

 

ALL conditions are true

All conditions are true: c1 AND c2 AND c3

NOT

ALL conditions are true

All conditions are false: NOT(c1 OR c2 OR c3)

Conditions In Test

Specify the conditions for the selection test. For example, one condition can check if the object belongs to a specific System, and another condition can check if it has a specific attribute or attribute value.

What property/attribute of the target to test

Specify the property or attribute that the selection test is to find and evaluate. For example, the test can select objects based on the System the objects are (or are not) using, as defined in How to test.

You can either set values to the following fields manually or click Search attribute to find the attribute (tag) to use.

  • Source – Select the source of the property, such as 'Object data (PM)'.
  • Class – Select a class to list only a specific sub-set of attributes the source has.
  • Attribute – Select the required attribute from the list.

How to test

Specify how to test the property you selected in What property/attribute of the target to test.

Condition

  • Select whether to use a negative 'NOT' condition.

    • A positive condition will only select items that have the specified property value, such as 'Mass Equal to 1000'. It will not select items that do not have the given property at all, irrespective of the comparison operator used.

    • A negative condition will select items that do not have the specified property or property value. For example, 'NOT(Mass Equal to 1000)' will match both objects that have no 'MAS' tag and objects where its value is not 1000.

  • Select the comparison operator to use. The list of operators depends on the targeted property.

    • 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.

  • Specify one or more comparison values for the selection test. You can either type the values to look for or select them with the Get Sample By tools.

Get Sample By

  • Pick – Select this option and click Get Sample By to pick a Plant Modeller model object that has the desired value.

  • Select – Select this option and click Get Sample By to choose values from a separate dialog.

    • If the targeted property is System, you can select Systems from the Object browser dialog.

    • If the targeted property is group, you can select groups from the Select Groups dialog.

Note these special cases:

  • If the targeted property is the 'Group membership path' (mbp) attribute and the operator is 'Match One Of', the Get Sample By tools generate patterns that are based on the selected groups and the Select Groups dialog's Select also content from subgroups option: selecting that option will match the pattern to both group and subgroup members, and clearing the option will only match the pattern to group members. This action replaces any previously specified comparison values.

  • If the targeted property is the 'Groups and members' (.LH) attribute (which is exclusive to this tool), the value can be either the group's name or G@<COS OID>, and it will be matched to the specified group's hierarchy. For example, 'Equal to MyGroup' will match the 'MyGroup' group, its subgroups, and all objects within the groups.

  • If the targeted property is a dimension with alternate dimension values, you can use these instead of metric units.

    If the targeted property is a 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
    40
    50 2
    65
    80 3
    90
    100 4
    115
    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

Related topics

Query editor