Base Query Definition
This shows the Query Items for the Base Query Definition. These elements correspond to the diagram. The Query Definition named ‘View3D_CAD’, accessible in the Table of Contents folder hierarchy Administration→Configuration→Query Definitions, is configured by default for the Dynamic Viewer and Streaming Viewers (see section Default Tree Grid View Definition for the default Tree Grid View Definition). This Query Definition can be used as a guide when creating alternative Queries for use with the Dynamic Viewer and Streaming Viewers.
The base query identifies what data is necessary for the required information described in section CAD / CAD Structure Data Model. It is important to understand that this Query Definition, when executed, will return the ‘Latest’ in Structure Resolution – see Section Structure Resolution) CAD Structure.
The properties given in the following table are required to be included in a Query Definition for the Dynamic Viewer and Streaming Viewer.
| ItemType | Alias | Property |
| CAD1 | CAD | id, keyed_name, x_min, x_max, y_min, y_max, z_min, z_max, config_id, is_current |
| CAD Conversioninfo | id, x_min, x_max, y_min, y_max, z_min, z_max | |
| CAD Instance | CAD Instance | id, transformation_matrix |
| File | File_1 | id, filename |
The CAD Query Item, defined as the child of the root (context Query Item), ‘reuses’ the relationships and Properties of the root Query Item. This also defines a recursive Query whereby all Items of the child will be re-queried with the same Properties and related content as the root, and so on. By default, the keyed_name Property value is used for the text in the Tree Grid View. The xyz_min/max Properties are used to define the bounding volume for the associated geometry in the view file. It is used by the 3D View to help optimize the display priority of 3D component geometry when rendering and focus the camera when the view data is refreshed.
CAD ConversionInfo is a Null Relationship added to the CAD ItemType specifically to store information/metadata collected from the conversion process. Legacy environments stored the same information directly on the CAD ItemType. Thus, processing the results from an execution of a Query Definition must first refer to the CAD ConversionInfo relationship and then the CAD Item if this relationship does not exist.
The CAD ConversionInfo Null Relationship stores metadata processed during the CAD conversion process, including bounding box content.
The CAD Instance Query Item should include the id and transformation_matrix Properties. As noted, the transformation matrix is used to position the view file geometry of the related child CAD Item.
The File Query Item that refers to the view file (note the Alias name - File_1 - in the table) should include the id and the filename Properties. These values are used to form the proper URL to the vault so the 3D Viewer can retrieve the view files during processing.