New graph definition - SmartPlant Foundation - IM Update 48 - 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)

Now that you can see how the view definition is related to the graph definition, it is possible to identify that the graph nodes DEVSharedPIDPipeCompPipeLine and ComprisedOf do not appear in the view definition and therefore are not used for display.

The graph definition can be redesigned as follows:

+ISPFTEFSharedPipingComponent/+ISPFTEFSharedPipingComponent/,

EDG_DEVSharedPIDPipingComponent/DEVSharedPIDPipingComponent/+ISPFTEFSharedPipingComponent,

EDG_DEVSharedPDSPipingComponent/DEVSharedPDSPipingComponent/+ISPFTEFSharedPipingComponent,

EDGNEWSharedPIDPipeCompPipeLineEnd1/DEVSharedPIDPipeCompPipeLineEnd1/DEVSharedPIDPipingComponent,

EDG_DEVNEWSharedPIDPipeCompDrawing/DEVSharedPIDPipeCompDrawing/DEVSharedPIDPipingComponent

The following lines show two remapped nodes in the graph. These lines are the last two lines of the redesigned graph definition code.

EDGNEWSharedPIDPipeCompPipeLineEnd1/DEVSharedPIDPipeCompPipeLineEnd1/DEVSharedPIDPipingComponent,

EDG_DEVNEWSharedPIDPipeCompDrawing/DEVSharedPIDPipeCompDrawing/DEVSharedPIDPipingComponent

The original edges were expanding from the top node. The edge EDG_DEVSharedPIDPipingComponent navigates to the ComprisedOf relationship, then applies criteria to limit only P&ID objects. By altering the edge behind the node and remapping the start point makes, the graph definition can be redefined, making two improvements:

  1. The comprised of relationship is already expanded and won’t need to be expanded a second time.

  2. The altered node is only applicable to PID data; in this instance, the starting objects are now PID objects only. Less relationship expansions are required to get the same result (PDS expansions give no results).

The new graph definition is shown graphically below:

new graph definition

The structure of the graph definition is altered to get the same results using less memory and time, because only the name of the node is important to the view definition, not its position in the graph definition.

  • Reports run with the Include Intermediate Nodes option enabled typically perform better. Where the additional rows in the report output are not wanted, it may be possible in some cases to post-process the output to remove them.

  • When creating a graph definition, consider if an edge definition expansion would be more efficient than a relationship definition expansion. Discrimination criteria added to an edge definition (in the form of an appropriate property comparison or valid end interface) may yield a smaller result set and create more efficient queries that do not query unnecessary database tables.

    If a graph definition is used for a document report, which has an expansion from Files to its attached object, an edge definition expansion is more efficient than a SPFFileComposition relationship expansion. This is because the edge definition expansion only considers documents and automatically excludes other object types, such as technical queries or submittals, and so on. For example:

    <EdgeDef>
      <IObject UID="EDG_TestVersion" Name="TestVersion" />
      <IPositionCriteria />
      <IEdgeDef StartInterfaceName="ISPFBusinessFile" PathDefn="+SPFFileComposition" ValidEndInterfaceDefUIDs="IFDWDocumentVersion" />
      <ISimpleCriteria PropComparisons="" />
      <ISPFEdgeDefExt />
      <IEdgeDef2 />
      <ISchemaObj />
    </EdgeDef>