Graph Definitions - Integration - Update 44 - Help - Hexagon

Integration Help

Language
English
Product
Integration
Search by Category
Help
Smart 3D Version
12.1 (2019)
Smart Construction Version
2019(7.0)
SmartPlant Foundation / SDx Version
10
Smart Electrical Version
2019 (9.0)
Smart Materials/Smart Reference Data Version
2020 (10.0)
Smart P&ID Version
9 (2019)
Smart Review Version
2020 (15.0)
Smart Engineering Manager Version
10 (2019)
Smart Interop Publisher Version
13.1 (2019 R1)
Smart Isometrics Version
7.0(2019)
Spoolgen Version
9.0(2019)

A graph consists of nodes and edges. The nodes (typically represented as circles) are connected to each other by the edges (lines). A directed graph is a special type of graph in which each of the lines goes in one direction only (typically represented using arrows). A directed graph traversal across an edge is always done in the one direction specified, never in the opposite direction.

The Schema Editor supports directed graph definitions (GraphDefs) for which the nodes are interface definitions and the edges are edge definitions. These directed graph definitions consist of a set of interface definitions (nodes) connected by a set of edge definitions (edges).

The definition of a directed graph begins by identifying the starting node (interface definition) for the graph. Once the starting interface definition has been defined, the next step in the process is to identify an edge (edge definition) to traverse. The list of edge definitions that can be used are the set of edge definitions that start at the specified interface definition or that start at an interface definition directly or indirectly implied by that interface definition.

When an edge (edge definition) is added to the graph, the node (interface definition) at the end of the edge is given a name. This name is used to identify the node for purposes of adding edges to the graph from that node.

After the starting node (interface definition) and the first edge (edge definition) have been defined, the directed graph consists of two nodes: one for the starting interface definition and one for the named interface definition at the end of the first edge. You can extend the graph definition by adding an edge to either the starting node (interface definition) or the node (interface definition) at the end of the first edge. You can continue to extend the graph definition this way until you have the graph definition that you want.

Occasionally, you may need to extend the graph from a specific node (interface definition) using an edge (edge definition) that starts at an interface definition that is not the interface definition for that node or an interface definition directly or indirectly implied by the interface definition for that node. In this case, you must identify a more "specialized" interface definition that either is or implies the starting interface definition for the edge definition that you want.

For example, consider a graph definition that starts at IEquipment and traverses the EquipmentEquipmentComponent relationship definition to reach a node corresponding to IEquipmentComponent. If you want to continue this graph definition from the node corresponding to IEquipmentComponent using a relationship definition that starts with INozzle, you must explicitly select INozzle rather than IEquipmentComponent for that node in the graph definition. Because INozzle is not implied by IEquipmentComponent, the relationships from INozzle are not, by default, available for continuing the graph definition.

Explicit Edge Definitions and Criteria

Every relationship definition results in two implied edge definitions: one for going from the interface definition at one end of the relationship definition to the interface definition at the other end and the second for traversing the opposite direction. For many graph definitions, the set of implied edge definitions is sufficient to define the graph definition. Occasionally a graph definition will require a more specific traversal than provided by the implicit edge definitions. For these cases, explicit edge definitions that define the more specific traversal are required.

Cases where explicit edge definitions are required include

  • Traversing across multiple relationships as a single edge

  • Traversing across a single relationship where only a subset of the objects at the other end of the relationship are required (the results need to be filtered)

  • Traversing multiple relationships where filtering is needed as part of a single edge. An example of this is the traversal from a graphical object to its drawing, which traverses the DrawingItems and DwgRepresentationComposition relationships. Examples of filtering include selecting the object at a particular position (1, 2, and so on), selecting only those objects that support a particular interface, or selecting those objects that have a particular value for a property.

Directed Graphs

When a directed graph definition is applied to an object (or a set of objects), the result is a directed graph in which the nodes are objects and the edges are edges. A directed graph is therefore an instance of a directed graph definition (just as an object is an instance of a class). Where the directed graph definition consists of nodes that are interface definitions and edges that are edge definitions, the directed graph consists of nodes that are objects and edges that are edges. Therefore, a directed graph definition can start at interface definition IEquipment and traverse EquipmentEquipmentComponent to get to IEquipmentComponent. The corresponding directed graph can start at vessel V-100 and traverse to equipment components N1, N2, N3 and N4.

Graph Definitions in SmartPlant Foundation

In SmartPlant Foundation, graph definitions are used to define default expansions and alternate expansions for class definitions. They are also used to define data sheets.

If the name of a class definition is the same as the name of a graph definition, the graph definition is automatically used to define the default expansion for the class definition. For example, when you expand an object in the tree view, the graph definition with the same name as the class to which the object belongs defines the default expansion that you see.

You can also define alternate expansions for class definitions. For alternate expansions to show up on the shortcut menu when you right-click an object in the SmartPlant Foundation client, you must create a new method that uses the GetObjsbyGraphDefName client API and references the appropriate graph definition. Default expansions created using graph definitions show up in the method section of the shortcut menu that appears when you right-click an object that exposes the starting interface defined in the graph definition.

See Also

Edge Definitions, Graph Definitions, and View Definitions
Edge Definitions
Create a Graph Definition