PrF UG queries create query
Creating a Single Query
The Queries Tab allows you to query your project and locate all instances that match the criteria you specify. You can create a simple query, or combine multiple criteria to restrict or expand your results.
You can create a simple query based on a class, a slot, or both. When you specify a slot, you also specify the criteria for matching the slot:
A query based solely on a class will find all instances of the selected class and all of its subclasses.
A query based solely on a slot will find all instances whose value at the slot match the criteria you specify.
A query based on a class and a slot will find all instances of the class that match the criteria at the selected slot.
Note: Sometimes the query buttons or query entry bar will not display correctly. You can refresh the query entry by clicking on another tab and then returning to the Query Tab.
The directions below show how to select a class first, then a slot. You can also select the slot first and then the class; this is useful if you remember the slot name, but are not certain of the classes that it is attached to. To do this, select the slot as in Steps 3 and 4, then select the class as in Steps 1 and 2. In this case, the Select Classes dialog box will show only those classes that have the selected slot.
To create a query:
To specify a class, click the Select Class button above the Class entry bar. (If you wish to create a query based solely on a slot, start at Step 3.)
</p>
Select the class you want from the Select Classes dialog box, then click OK. (If you wish to create a query solely on that class, you are now ready to run it.)
Click OK.
To specify a slot, click the Select Slot button, above the Slot entry bar.
Select a slot from the Select Slot dialog box. If you selected a class, only slots attached to that class will be shown. If no class is selected, all slots are available.
Click OK. The slot will be filled in and the criteria menu immediately to the right will be displayed.
Make a selection from the pull-down criteria menu. This menu becomes active after you select a slot; the choices are based on the slot's Value Type.
Enter a value for comparison at the entry bar to the right. The entry method for this value depends on the slot value type.
For Boolean value type, select whether the slot value is true or false.
For Class value type, click the Select Class button and select a class from the dialog. The query will find all instances where the slot value contains (or does not contain) the selected class.
For Float or Integer value type, enter the number to which you want to compare the slot value.
For Instance value type, click the Select Instance or Select Query button and select a value from the dialog box.
For Symbol value type, the possible values are displayed as a drop-down list. Select a symbol from this list.
Note: Sometimes the query buttons or query entry bar will not display correctly. You can refresh the query entry by clicking on another tab and then returning to the Query Tab.
</ol>
To run the query, click Find .
To save the query in the Query Library, give it a name and click the Add Query to Library button.
</div>