Advanced queries

An advanced query retrieves a list of Plant Modeller objects that currently exist in the active project and match the test conditions of the query. Advanced queries are commonly used in various parts of the system, and knowing how to build effective queries can really speed up the way you locate and select specific objects from a project. Typically, you use an advanced query to create a list objects that have a common purpose or property, such as all pipe parts that have been modified after a specific date, or to select objects that you want to handle as a set.

Advanced queries are very dynamic to use. You can run an old query and it will also consider any matching objects that have been added to the project after the query was last saved. (In contrast, in a saved group the set of objects is static, and you have to manually add new objects to it.) Or, you can adjust the query settings and conditions to retrieve a different set of objects.

Advanced queries can be temporary, local to the current user, or available to all users, as described in Query types. Advanced queries are always created and edited in specific context, but they can often be reused in different contexts, especially when made available to other project users.

Depending on the context, when you select to define an advanced query one of the following dialogs opens:

  • The Edit Query dialog. This is where you define the general query settings, such as which object types to consider in the query. See Query editor.
  • The Edit Selection Test dialog. This is where you define selection tests that the queried objects must pass to be included in query results. See Query test editor.

Use Case Examples

You can use an advanced query for example to create a material listing for a set of objects, as described in Advanced query example: material list. Here are some other contexts where you can use advanced queries:

  • To find specific objects from the model, as described in Find.
  • To select objects to be checked in or out, as described in Checkouts.
  • To select two sets of objects for collision checking, as described in Types of test.
  • To select a set of objects to be published in an eBrowser model, as described in Publishing an eBrowser model.