Enabling Structure Resolution

Structure Resolution is enabled for the Base Query Definition (Section Base Query Definition). However, to incorporate it a new Query Definition must be created – as defined earlier in this section – and Structure Resolution enabled for it. The following steps describe how to add Structure Resolution to a Query Definition that derives from the Base Query Definition.

Step 1: Create Structure Resolution Mode Parameter

Applying a specific Structure Resolution Mode (‘Default’, ‘Latest’, etc.) is done using a Query Parameter. Using the Query Parameters Dialog, add a Parameter to be used for Structure Resolution Mode. For example ‘StructureResolutionMode’ and assign the default value ‘Aras.Resolution.EntryPoint;Default’.

Note
Be sure to check the syntax of the Default Value for the Parameter. It is used to select a specific List Item as set in the Tree Grid View Definition and described in Step 4.

Step 2: Incorporate the Query Parameter

The added Query Parameter must be incorporated into the Query Definition in order for it to be used/exposed to the end-user. Add it as part of the Join Condition of the Child CAD Query Item as shown in the figure. Replace the default Join Condition – ‘[CAD Structure].related_id = CAD.id’ with the following – ‘'$StructureResolutionMode;parent.related_id’ = CAD.id’.

Note
Be sure to check the syntax of the Join Condition. It must be as specified above (without the outer quotes). This assumes the value StructureResolutionMode was used for the Query Parameter Name. The Structure Resolution Mode Query Parameter can only be inserted once in a Query Definition. It cannot be used/applied to more than one Query Item.

Step 3: Add Resolve Query Entry Point Method

Show the Relationship Tabs for the Query Definition in the Form View if they are not shown. This can be done by selecting Tabs On for the Default Structure View in the qry_QueryDefinition ItemType form. Once shown, select the qry_QueryDefinitionEvent Relationship Tab. A Method needs to be added to the OnBeforeExecute event. To do this, select the Select Items Icon to create a Relationship and select the qry_ResolveStructureEntryPoint Method and assign it to the OnBeforeExecute event as shown in the figure.

Step 4: Add the Query Parameter to the Tree Grid View Definition

For the Query Parameter to be used, it must be enabled (made visible) in the Tree Grid View Definition used for the 3D View. Open the Map Parameters Dialog in the Tree Grid View Definition within the Editor View. Select the Visible check box for the StructureResolutionMode row. The Data Type is a List and the Data Source is the List qry_StructureResolution.

With this Configuration, users will be able to select specific Resolution Modes by opening the Query Parameters Dialog in the Tree Grid View used within the 3D Viewer.