Expanding GraphDefs - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

Expanding GraphDefs is similar to edge expansion except you specify the criteria before you call the function to run the graph. This allows you to specify multiple OBIDs as the starting point for the graph.

Dim lobjGraph As IDirectedGraphDef = CType(lobjGraphRel.GetEnd1.ToInterface("IDirectedGraphDef"), IDirectedGraphDef)

Dim lobjQueryReq As SPFRequestContext.Instance.QueryRequest

lobjQueryReq.AddQueryGraphDefCriteria(lobjGraphRel.EdgeRole, "OBID", "", "IN(" & OBID & ")")

Dim lobjGraphResults As StructuredObjectCollection = lobjQueryReq.RunByExpandGraphDef(lobjGraph)

lobjIncludesObjects.AddRange(lobjGraphResults.AllObjects)