Reconfigure document query - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

When querying for a document, the client always displays the version (documents are made up of master, revision, version) regardless of the part queried. The code that expands the document is more efficient traversing relationships up from the version, to the revision, and to the master, than moving down from the master, to the revision, and to the version. It is easier to find the revision and master from a version, because a version is related to only one revision and a revision is related to only one master.

If the majority of the criteria used to search are on the master, then configure the query method using a master interface. If the majority of the criteria are on the revision, use a revision interface. If the level choice is not obvious because there are criteria at all levels, then use an interface as far down the relationship tree as possible.

The following image shows details of the Query For Design Documents menu item, including the method behind the menu item to query for document versions:

The following list includes a description of only the key options on the dialog box that specify that the query is searching for a version.

  1. RelDef to navigate to the ClassDef – This relationship definition relates the version class definition to the classification tree nodes. There are two ways to alter the query:

    1. Set up a new relationship definition to relate the document master class definition to the relevant classification tree nodes, update the method to use this new relationship definition, and create instances of this relationship.

      1. Example RelDef:

        <RelDef>

              <IObject UID="SPFDesignDocClassMasterDocClassDef" Name="SPFDesignDocClassMasterDocClassDef" Description="ClassDef for the document classification"/>

              <IRel UID1="ISPFDesignDocClass" UID2="IClassDef"/>

              <IRelDef Role1="Document Classification" End1Locality="Across" Min1="0" Max1="*" SpecOfUID="SPFObjClassClassDef" Min2="0" Max2="1" End2Locality="Across" Role2="Class Definition"/>

              <IRelDef2/>

              <ISchemaObj/>

              <ISPFRelDefExt/>

          </RelDef>

      2. Example instance of the relationship to load:

          <Rel>

            <IObject UID="DC_3D_Documents_1.SPFDesignDocMaster" />

            <IRel UID1="DC_3D_Documents_1" UID2="SPFDesignDocMaster" DefUID="SPFDesignDocClassMasterDocClassDef" />

           </Rel>

    2. Remap any instances of the current relationship (SPFDesignDocClass) to the master class definition. For example, remap the relationship instance of SPFDesignDocClassClassDef to SPFDesignDocMaster. This is between the document classification 3D Documents and SPFDesignDocVersion.

  2. Primary interface override – Replace this version interface with the counterpart interface for the master (ISPFDesignDocMaster).

With these configuration changes, the form runs from the master, but the name still looks at the version. The SQL built for the database query still runs through the revision to the version to get the name.

The key options would need to be altered to change the query to find document masters using the information provided.

Reconfigure the complex level of a section

The name and description properties are attached to the form section named DocNameDes_Q-Section.

An option on the Update dialog box for the section denotes the level of the complex object that the section refers to:

$3 = Version

$2 = Revision

$1 = Master

To set the level to master, change the Indicates what level the section is in the complex structure field to $1, as shown in the following image:

qfind-main details