How custom processors locate and calculate values to set on mapped properties - Intergraph Smart Construction - 2019 (7.0) - Customization - Hexagon PPM

Intergraph Smart Construction Customization (2019)

Language
English
Product
Intergraph Smart Construction
Search by Category
Customization & Programming
Smart Construction Version
2019(7.0)

This section describes how Smart Construction custom processors locate the relationship definitions and interface definitions from which to calculate values set on mapped properties.

PDS_PipeSpool and P3DSpool Class Definitions

Property

Description

SPC_ComponentItem_Material

The processor expands the AssemblyHierarchy relationship definition to get all components related to the spool.

  • Spool > Components of the spool

The processor reviews all spool components that are pipes and have instantiated the IPipeOcc interface definition. The processor gets the material value from the MaterialsCategory property definition exposed by the ISpecifiedMatItem interface definition. It exits the iteration when a non-empty materials value is found.

  • Spool > Pipes in spool (IPipeOcc) (ISpecifiedMatItem, MaterialsCategory)

If no value was found from the previous step, the processor goes through all spool components that are piping components and have instantiated the IPipingComponentOcc interface definition. The processor gets the material value from the MaterialsCategory property definition exposed by the ISpecifiedMatItem interface definition. It exits the iteration when a non-empty materials value is found.

  • Spool > Piping components in spool (IPipingComponentOcc) (ISpecifiedMatItem, MaterialsCategory)

If a valid (non-empty) value was found from either step above, that value is set on SPC_ComponentItem_Material.

SPC_ComponentItem_Thickness

The processor expands the AssemblyHierarchy relationship definition to get all components related to the spool.

  • Spool > Components of the spool

The processor reviews all spool components that are pipes and have instantiated IPipeOcc interface definition. The processor gets the thickness value from the ScheduleThickness2 property definition exposed by IPipeCrossSectionItem.

If the data is from a PDS data set, the thickness value is read from the FirstSizeSchedule property definition exposed by IPipingPortFirstSide. All non-empty values found during this step are added to the collection for further processing.

  • Spool > Pipes in spool (IPipeOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

  • (PDS) Spool > Pipes in spool (IPipeOcc) (IPipingPortFirstSide exposes FirstSizeSchedule)

If no values were found from the previous step, the processor goes through all spool components that are piping components and have instantiated IPipingComponentOcc interface definition. The processor gets the thickness value from the ScheduleThickness2 property definition exposed by IPipeCrossSectionItem.

If the data is a PDS data set, the thickness value is read from the FirstSizeSchedule property definition exposed by IPipingPortFirstSide. If the value found is NREQD or MATCH, the processor goes to the piping ports of the piping component, expands the PipingPortComposition relationship definition, and adds any values it finds to the collection. All non-empty values found during this step are added to the collection for further processing.

  • Spool > Piping components in spool (IPipingComponentOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

  • Piping Component > Ports (IPipeCrossSectionItem exposes ScheduleThickness2)

or

  • (PDS) Spool > Piping components in spool (IPipingComponentOcc) (IPipingPortFirstSide exposes FirstSizeSchedule)

  • (PDS) Piping Component > Ports (IPipingPortFirstSide exposes FirstSizeSchedule)

If only one value is found, that value is used on the SPC_ComponentItem_Thickness. If multiple values are found, either the maximum or minimum thickness is used as the value. Minimum thickness is used if the thickness values came from the pipes. Maximum thickness is used if the thickness values came from the piping components or the ports of the piping components. Maximum and minimum thickness is determined in the retrieve mappings spreadsheet.

PDS_Dwg_Weld, P3DWeld, and CR3DWeld Class Definitions

Property

Description

SPC_ComponentItem_Material

The processor expands the OwnsImpliedItems relationship definition and gets all implied items related to the weld. If the domain of the weld is SmartPlant Interop Publisher, the process expands the PBSSystemHierarchy relationship definition. The processor attempts to get the material value from the MaterialCategory property definition. If a non-empty value is found, it is used on the SPC_ComponentItem_Material.

  • Weld > Implied item (ISpecifiedMatItem exposes MaterialsCategory)

SPC_ComponentItem_Thickness

The processor expands the PipingPortOwnsConnectionItem relationship definition to get the owning port object. If the owning port object returns no value, the processor expands the OwnsImpliedItems relationship definition to get the implied item.

  • Weld > Owning port

  • Weld > Implied item

If the item found from the previous step contains either the IPipingPort or IPipeOcc interface definitions, the processor gets the thickness value from the ScheduleThickness2 property.

  • Item (IPipingPort or IPipeOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

If the item found in the first step contains the IPipingComponentOcc or IInstrumentOcc interface definition, the processor also gets the thickness value from the ScheduleThickness2 property. If the value found is NREQD or MATCH, the processor goes to the piping ports of the piping component, expands PipingPortComposition relationship definition, and adds any values it finds to the collection. All non-empty values found during this step are added to the collection for further processing.

  • Item (IPipingComponentOcc or IInstrumentOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

  • Piping component > Ports (IPipeCrossSectionItem exposes ScheduleThickness2)

If only one value is found, that value is used on the SPC_ComponentItem_Thickness. If multiple values are found, the maximum thickness is used as the value. Maximum and minimum thickness is determined in the retrieve mappings spreadsheet.

SPC_ComponentItem_Size

The processor expands the PipingPortOwnsConnectionItem relationship definition to get the owning port object. If the owning port object returns no value, the processor expands the OwnsImpliedItems relationship definition to get the implied item.

  • Weld > Owning port

  • Weld > Implied item

If the item found from the previous step contains the IPipingPort or IPipeOcc interface definitions, the processor gets the NPS value from the NominalDiameter property exposed by IPipeCrossSectionItem. NPS is set as the value on SPC_ComponentItem_Size.

  • Item (IPipingPort or IPipeOcc) (IPipeCrossSectionItem exposes NominalDiameter)

If the item found in the first step contains the IPipingComponentOcc or IInstrumentOcc interface definition, the processor gets the NPS value from (IPipeCrossSectionItem, NominalDiameter). If no value is found, the processor goes to the piping ports of the piping component, expands the PipingPortComposition relationship definition, and adds any values it finds to the collection. If a collection of NPS are found, the maximum NPS value found is used on SPC_ComponentItem_Size.

  • Item (IPipingComponentOcc or IInstrumentOcc) (IPipeCrossSectionItem exposes NominalDiameter)

  • MAX (Piping component > Ports (IPipeCrossSectionItem exposes NominalDiameter))

PDS_Dwg_PipeRun Class Definition

Property

Description

SPC_ComponentItem_Material

The processor expands OwnsPartOcc relationship definition to get all the piping parts related to the pipe run.

  • Pipe Run > Pipe Run Parts

The processor traverses all pipe run parts related to pipes that have instantiated IPipeOcc and gets the material value from the MaterialsCategory property exposed by ISpecifiedMatItem. The processor exits the iteration once a non-empty materials value is found.

  • Pipe Run > Pipe Run Parts (IPipeOcc) (ISpecifiedMatItem exposes MaterialsCategory)

If no value was found from the previous step, the processor goes through all pipe run parts that are piping components that have instantiated IPipingComponentOcc and gets the material value from the MaterialsCategory property. The processor exits the iteration once a non-empty materials value is found.

  • Pipe Run > Pipe Run Parts (IPipingComponentOcc) (ISpecifiedMatItem exposes MaterialsCategory)

If a valid (non-empty) value was found from either step above, that value is used on SPC_ComponentItem_Material.

SPC_ComponentItem_Thickness

The processor expands the OwnsPartOcc relationship definition to get all the piping parts related to the pipe run.

  • Pipe Run > Pipe Run Parts

The processor traverses all pipe run parts that are pipes and have instantiated IPipeOcc, then gets the thickness value from the ScheduleThickness2 property exposed by IPipeCrossSectionItem. The processor adds all non-empty values found during this step to the collection for further processing.

  • Pipe Run > Pipe Run Parts (IPipeOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

If no values were found from the previous step, the processor goes through all pipe run parts that are piping components that have instantiated IPipingComponentOcc and gets the thickness value from the ScheduleThickness2 property. If the value found is NREQD or MATCH, the processor goes to the piping ports of the piping component, expands PipingPortComposition relationship definition, and adds any values it finds to the collection. The processor adds all non-empty values found during this step to the collection for further processing.

Pipe Run > Pipe Run Parts (IPipingComponentOcc) (IPipeCrossSectionItem exposes ScheduleThickness2)

Pipe Run Parts > Ports (IPipeCrossSectionItem exposes ScheduleThickness2)

If only one value is found, that value is used on SPC_ComponentItem_Thickness. If multiple values are found, the maximum thickness is set as the value. Maximum thickness is determined in the retrieve mappings spreadsheet.

PDS_Dwg_PipeBoltSet, P3DPipeBoltSet, and CR3DPipingBoltSet Class Definitions

Property

Description

SPC_MaterialItem_Size

The processor attempts to get the bolt diameter from the object from the BoltDiameter property exposed by IBolt and uses this diameter to set the value on SPC_MaterialItem_Size. If the value is found, the ~ is replaced with an empty space.

  • Item (IBolt exposes BoltDiameter)

If a value was found from the previous step, the processor attempts to get the length value from the Bolt_CalculatedLength property exposed by IBolt. If a length value is found, the ~ is replaced with an empty space, and the resulting string is set as a concatenated value of the previous step. The output calculation is value1 x value2, for example, 5 in x 2 in.

  • Item (IBolt exposes Bolt_CalculatedLength)

PDS_Dwg_Gasket Class Definition

Property

Description

SPC_MaterialItem_Size

The processor attempts to get the outer diameter value from the component object from the OuterDiameter property exposed by IPipeCrossSectionItem, and it uses this diameter to set the value on SPC_MaterialItem_Size. If the value is found, the ~ is replaced with an empty space before the value is set.

If the outer diameter is not found, this property is not set.

  • Item (IPipeCrossSectionItem exposes OuterDiameter)

PDS_Dwg_PipingComponent Class Definition

Property

Description

SPC_MaterialItem_Tag

The processor attempts to get a commodity code value from the piping component object that uses the SizeIndependentCommodityCode property exposed by I3DPipingPart.

If a commodity code is found, then this property is set with this value found.

  • Item (I3DPipingPart exposes SizeIndependentCommodityCode)

If commodity code is not found, the processor gets the name of the component using the Name property exposed by IObject and sets that as the value on SPC_MaterialItem_Tag.

P3DEquipment Class Definition

This custom property processor does not change any of the values that are mapped in the retrieve mapping spreadsheet. The P3DEquipment class definition overrides the GetImpliedItems method from the BaseRetrievePropertyProcessor class definition.

Base Class Implementation

Public Overridable Function GetImpliedItems(ByVal pubobj As IObject) As IObjectDictionary Implements ISPCRetrievePropertyProcessor.GetImpliedItems

If pubobj.DomainUID.ToUpper = DOMAIN_SPIOP Then

Return pubobj.SPC_GetEnd1s(RELDEF_PBS_SYSTEM_HIERARCHY)

Else

Return pubobj.SPC_GetEnd2s(RELDEF_OWNS_IMPLIEDITEMS)

End If

End Function

Custom Processor Implementation

Public Overrides Function GetImpliedItems(ByVal publishedObject As IObject) As IObjectDictionary

Dim ownedItemRels As IRelDictionary = publishedObject.GetEnd2Relationships.GetRels(RELDEF_EQUIPMENTCOMPONENT)

If ownedItemRels IsNot Nothing AndAlso ownedItemRels.Count() > 0 Then

Return ownedItemRels.GetEnd1s.Items(CLASSDEF_EQUIPMENTCOMPONENT)

Else

Return Nothing

End If

End Function