Query editor

In the Edit Query dialog you can specify the general settings of a COS query.

The editor is divided into sections, and each section functions as one type of filtering method. When running a query, the filters are executed from top to bottom, and objects that pass these filters are included in the query results.

Object types

In the Object types section of the query editor, you can select which object types to include in the query.

When selecting object types, note the following:

  • Dependencies between 3D objects can affect what the query eventually selects from the model. For example, if the query includes the 3D Space object type, the query can select any type of model object that has a Service Space attached to it. However, some query-based selection methods allow the user to disable auto-selection of dependent objects before running the query.

  • "Hull construction part" means objects created in CADMATIC Hull, including insulation.

  • "Hull Part" means objects created in CADMATIC Hull Classic.

Also consider the possible impact to Rules:

  • If you want a selection test to define a condition that matches specific objects types, those object types must be included in the query.
  • If you want a selection test to use a negative condition such as "NOT equal to NS100", selecting multiple object types to the query might apply the negative condition to objects that do not have the specified property (NS = Nominal Size) and thus give false results.

Object settings

In the Object settings section of the query editor, you can specify the following:

  • Piping unit size – Select whether a pipe object is included in query results when it is defined as a piping part or only when it belongs to a spool/prefabricated unit.

  • Cable network – If Object types includes "Cable Network Part", select what part of the cable routing network to include in query results:

    • Whole network – If any cable network part fulfills the query, all cable network parts are included in query results.

    • Only parts associates to other objects in the set – If objects that host cable network parts fulfill the query, also the associated cable network parts are included in query results. These rules apply:

      • If Object types includes "Cable tray", "Piping" or "Equipment", then the host objects define which cable network parts are included.

      • If Object types includes "Cable", then the route of the cable defines which cable network parts are included.

Bounding box

In the Bounding box section of the query editor, you can define a bounding box test that objects must pass to be included in the query results.

You define a part of the model area as a query-specific "test box", and objects will be selected based on their location in relation to this box.

First, select how to test:

  • None – A bounding box test is not performed; the query considers the whole model area.
  • Inside – Object is included in query results if its bounding box is completely inside the test box.
  • Intersecting – Object is included in query results if its bounding box is completely or partially inside the test box.
  • Outside – Object is included in query results if its bounding box is completely outside the test box.

Then, define the limits of the test box. You can type the min and max values if you know them, or you can click the 1st Corner and 2nd Corner buttons to pick two opposite corners from the model. When saving the query, the values are automatically sorted so that the smaller values define the first corner.

Rules

In the Rules section of the query editor, you can manage selection tests that objects must pass to be included in the query results.

A single query can contain multiple selection tests, and each test can contain multiple conditions.

The program uses the logical operator OR between individual selection tests; objects will be included in query results if they pass at least one of the tests.

In the following example, an object would pass the test and get selected if either its nominal size is 100 or its System name is something else than "Hot_Water":

Within an individual test, you can select whether all conditions of that test must be passed, or if passing one condition is enough. Accordingly, if objects should fulfill several conditions (using the logical operator AND) to be included in query results, you should create a single test that contains multiple conditions.

Click New or Modify as appropriate and define the test details as described in Query test editor.