Detection and Deletion of Orphan Elements
In Plantsight visualizer, when component is available along with its physical and functional data but no association with any pipeline is seen then due to this missing association these components behave as orphan components. You would not be able to check-out those Orphan components from iTwin in OpenPlant Modeler
Enter the following keyin to detect and display the orphan components. This key-in works on rules to identify any orphan objects in iTwin (physical model only).
Enter the following keyin to delete the orphan components. This command requires locks on all orphan objects and will delete them all. Failure to acquire a single lock would fail the overall workflow.
Rules for Orphan component identification and deletion
The default implementation in Modeler.cfg at Workset level identifies any orphan segments, piping components, nozzles, IsoSheets, ports, joints, seals, fasteners and valve operators. You can customized as per requirement.
#---------------------------------------------------------------------- # Rules for Orphan component identification and deletion. A rule consists of two items # className followed by '|' separator followed by relationship name # This means code will search for class 'className' in iTwin and if it (target) doesn't have any # relationship using 'relationship name' to another object (source), it will be treated as orphan. # An example is 'ISO_SHEET|PIPING_NETWORK_SYSTEM_HAS_ISO_SHEET', so any ISO_SHEET that is not related # a pipeline via 'PIPING_NETWORK_SYSTEM_HAS_ISO_SHEET' relationship is considered orphan. # Code only reads rules pointed by 'OPM_BIM_CHECK_ORPHAN_RULES'. # Order of the rules are important. # Polymorphic class name and relationship names can be used (if possible use specific class name and # relationship name). #---------------------------------------------------------------------- OPM_BIM_ORPHAN_VOD_RULE=VALVE_OPERATING_DEVICE|VALVE_HAS_VALVE_OPERATING_DEVICE OPM_BIM_ORPHAN_ISOSHEET_RULE=ISO_SHEET|PIPING_NETWORK_SYSTEM_HAS_ISO_SHEET OPM_BIM_ORPHAN_NOZZLE_RULE=NOZZLE|EQUIPMENT_HAS_NOZZLE OPM_BIM_ORPHAN_FASTENER_RULE=FASTENER|JOINT_HAS_FASTENER OPM_BIM_ORPHAN_SEAL_RULE=SEAL|JOINT_HAS_SEAL OPM_BIM_ORPHAN_JOINT_RULE=JOINT|PORT_HAS_JOINT;$(OPM_BIM_ORPHAN_SEAL_RULE);$(OPM_BIM_ORPHAN_FASTENER_RULE) OPM_BIM_ORPHAN_PORT_RULE=PORT|DEVICE_HAS_PORT;$(OPM_BIM_ORPHAN_JOINT_RULE) OPM_BIM_ORPHAN_PCOMP_RULE=PIPING_COMPONENT|SEGMENT_HAS_PIPING_COMPONENT;$(OPM_BIM_ORPHAN_NOZZLE_RULE);$(OPM_BIM_ORPHAN_PORT_RULE) OPM_BIM_ORPHAN_PSEG_RULE=PIPING_NETWORK_SEGMENT|PIPELINE_HAS_SEGMENT;$(OPM_BIM_ORPHAN_PCOMP_RULE) #Following cfg. variable points to all these rules above and is used in OPM. OPM_BIM_CHECK_ORPHAN_RULES=$(OPM_BIM_ORPHAN_PSEG_RULE);$(OPM_BIM_ORPHAN_ISOSHEET_RULE);$(OPM_BIM_ORPHAN_VOD_RULE)