Scripts for Piping ModelAll piping parts directly under specific subsystem. Let currentInstance(PLMCoreInstance) Let RootFather(PLMCoreReference) Let PipPartOcc(ProductOccurrence) Result = Input.IsASortOf("Piping_Pipe_Occurrence") Let SubsytemName(String) set SubsytemName = "Physical - PIP - BN 366 - Block 40 - 722 FW Cooling" if(Result) { /* Navigate to the father */ set PipPartOcc = Input set currentInstance = PipPartOcc.Instance set RootFather = currentInstance.Owner Result = ( RootFather <> NULL) if(Result) Result = (RootFather.V_Name == SubsytemName) } All pipes under specific subsystem (Direct child or indirect child of specific subsystem) Let currentInstance(PLMCoreInstance) Let RootFather(PLMCoreReference) Let PipeOcc(ProductOccurrence) Let ii(Integer) Let SubsytemName(String) set SubsytemName = "Physical - PIP - BN 366 - Block 40 - 722 FW Cooling" Result = Input.IsASortOf("Piping_Pipe_Occurrence") if(Result) { /* Navigate to the father */ set PipeOcc = Input Result = FALSE for ii while PipeOcc <> NULL AND Result == FALSE { set currentInstance = PipeOcc.Instance set RootFather = currentInstance.Owner Result = ( RootFather <> NULL) if(Result) { Result = (RootFather.V_Name == SubsytemName) } if(Result == FALSE) set PipeOcc = PipeOcc.Owner } } All Rigid pipes Let PipeOcc(Piping_Pipe_Occurrence) Let PipVPMRerence(VPMReference) Set PipeOcc = Input if(PipeOcc <> NULL) { set PipVPMRerence = PipeOcc.Reference if(PipVPMRerence <> NULL) Result =PipVPMRerence.IsASortOf("Piping_Rigid_Pipe") } All Piping Flanges with SubPartType (Flange) Let PipPartOcc(Piping_Part_Occurrence) Let PipVPMReference(VPMReference) Let PipPartV1(Piping_PartV1) /*If the input is a Piping part*/ set PipPartOcc = Input if(PipPartOcc <> NULL) { set PipPartV1 = PipPartOcc.Reference /*If the Piping part */ if(PipPartV1 <> NULL) { /*Get the SubPartType name, see if it is "Flange" */ Result = (PipPartV1.V_SubPartType == "Flange") } } Script for Structure Functional Data (SFD)All SFD plate with thickness 20mm Let SFDPPlate(SldPlate) Let PlateThickness(LENGTH) set PlateThickness = 20mm set SFDPPlate = Input Result = ( Input.IsASortOf("SldPlate") ) if(Result) Result =( NULL <> SFDPPlate and (round(SFDPPlate.Thickness,"mm",2.0) == round(PlateThickness,"mm",2.0))) All SFD Plate Result = Input.IsASortOf("SldPlate") All SFD Stiffener Result = Input.IsASortOf("SldStiffener") Scripts for Structure Design Data (SDD)All SDD Structure Stiffeners Let StructureOcc(ProductOccurrence ) Let StructureRef (PLMCoreReference) Let StructureSiff(Structure_Stiffener) set StructureOcc = Input set StructureRef = StructureOcc.Reference Result = StructureRef.IsASortOf("Structure_Stiffener") All SDD Structure Plates Let StructureOcc(ProductOccurrence ) Let StructureRef (PLMCoreReference) set StructureOcc = Input set StructureRef = StructureOcc.Reference Result = StructureRef.IsASortOf("Structure_Plate") All SDD Structure Plates of Thickness 20mm Let StructureOcc(ProductOccurrence ) Let StructurePlateRef(Structure_Plate) set StructureOcc = Input if(StructureOcc <> NULL) { set StructurePlateRef = StructureOcc.Reference if(StructurePlateRef <> NULL) { Result =((round(StructurePlateRef.V_StrThickness ,"mm",2.0) == round(20mm,"mm",2.0))) } } |