Creating Piping Part Class Reports - Intergraph Smart 3D - Help - Hexagon

Intergraph Smart 3D Catalog

Language
English
Product
Intergraph Smart 3D
Subproduct
Catalog
Search by Category
Help
Smart 3D Version
13.1

You can modify your catalog data in either the Catalog task or in Microsoft Excel workbooks, which you can then bulkload into the Catalog database. Using the Engineering Check Reports, you can export your piping part data from the Catalog database back into Excel workbooks for editing. You can then bulkload the edited workbook back into the original Catalog database or another Catalog database.

Because piping part classes can be customized, a master piping part class report template is delivered with the software. You must copy and edit this master piping part class report template for each piping part class that you want to report on using the Engineering Check Reports. The master piping part class report template is based on the "ButterflyValve" part class, and is delivered in [Reference Data Product Folder]\SharedContent\Reports\Types of Reports\Catalog Engineering Checks\Piping\Master Piping Part Data folder on the reference data server. The files in that folder are:

Butterfly Valve.rfp
Butterfly Valve.rfm
Butterfly Valve.rdy
Butterfly Valve.rtp
Butterfly Valve1.rqp
Butterfly Valve2.rqp
Butterfly Valve - Plant.rqe
Butterfly Valve - Part Data.rqe
Butterfly Valve.xls

Step 1: Copy and Rename Folder and Files

The first step in creating your piping part class report is to copy the master ButterflyValve template and rename the folder and files.

  1. Create a copy of the master ButterflyValve report template folder in the Catalog Part Classes folder.

  2. Rename the copied folder to be the name of your piping part class, for example "MyPartClass".

  3. Rename all the files in the folder to be the name of you piping part class. For example, rename Butterfly Valve.rfp to be MyPartClass.rfp.

Step 2: Search and Replace Part Class Name in Files

The next step is to open the following files searching for "Butterfly Valve" and replacing that with the name of your piping part class.

MyPartClass.rfp
MyPartClass.rfm
MyPartClass.rdy
MyPartClass.rtp
MyPartClass1.rqp
MyPartClass2.rqp
MyPartClass - Plant.rqe

Step 3: Modify the MyPartClass - Part Data.rqe File

Open the "MyPartClass - Part Data.rqe" file searching for "Butterfly Valve" and replacing that with the name of your piping part class.

The MyPartClass - Part Data.rqe file contains the query to execute on the reports database. In the <SQL> tag is the sql query for SQLServer.

For a part class that has two ports, this file will have two sections like what is shown below. Correspondingly, a single port part class will have one section, and a three port part class will have three sections. Therefore, copy and paste the section in the file to match the number of ports that your part class has and then edit the trailing number (2, 3, 4 and so forth) accordingly.

--Port1 info
port1.endprep_shortvalue               'EndPreparation1',
port1.schedulethickness_shortvalue     'ScheduleThickness1',
port1.pressurerating_shortvalue        'PressureRating1',
port1.flowdirection_shortvalue         'FlowDirection1',
port1.endstandard_shortvalue           'EndStandard1',
port1.NPD                              'Npd1',
port1.NPDUnitType                      'NpdUnitType1',
port1.PipingPointBasis_shortvalue      'PipingPointBasis1',
port1.Id                               'Id1',
--Port2 info
port2.endprep_shortvalue               'EndPreparation2',
port2.schedulethickness_shortvalue     'ScheduleThickness2',
port2.pressurerating_shortvalue        'PressureRating2',
port2.flowdirection_shortvalue         'FlowDirection2',
port2.endstandard_shortvalue           'EndStandard2',
port2.NPD                              'Npd2',
port2.NPDUnitType                      'NpdUnitType2',
port2.PipingPointBasis_shortvalue      'PipingPointBasis2',
port2.Id                               'Id2',

The dimensional attributes start with a comment. Based on the number of dimensional attributes that your part class has, you need to add the corresponding statements. For example, if you are adding a new attribute named HandleAngle, then:

--Dimensional Attributes
PD1.FacetoFace         'FacetoFace'
PD1.HandleAngle        'HandleAngle'

For part classes with two ports, there will be two sections like what is shown below. Copy and paste (or delete) the section in the file to match the number of ports that your part class has and then edit the trailing number (2, 3, 4 and so forth) accordingly.

--port information
   JOIN XpartContainsNozzles rpn1 on rpn1.oidorigin = x1.oid
   LEFT JOIN JCatalogpipeport_CL port1 on (port1.oid = rpn1.oiddestination and port1.PortIndex = 1)
   JOIN XpartContainsNozzles rpn2 on rpn2.oidorigin = x1.oid
   LEFT JOIN JCatalogpipeport_CL port2 on (port2.oid = rpn2.oiddestination and port2.PortIndex = 2)
   JOIN XPartClassContainsParts x4 on (x4.oiddestination = x1.oid)
   JOIN JDPartClass x5 on (x5.oid = x4.oidorigin)
where x5.partclasstype like 'PipeComponentClass'
   and port1.oid is not null
   And port2.oid is not null

You should also make the same changes to the sql query for Oracle as you made for SQLServer.

Step 4: Modify the MyPartClass.xls File

Open the MyPartClass.xls file in Microsoft Excel and make the following changes:

  1. Unhide all the rows in the butterflyvalve sheet.

  2. Rename the butterflyvalve sheet to be MyPartClass.

  3. Add any additional part class attributes. To continue the example from above, assume you need to add an attribute called HandleAngle.

    1. In an empty column at the end, add HandleAngle in row 8.

    2. In the same column in row 10, type Handle Angle.

    3. In the same column in row 11, type #PartData::[lbl_HandleAngle]#.

  4. Edit the port information in rows 8, 10, and 11 to match number of ports that your part class has. Again, edit the trailing numbers (2, 3, 4, and so forth) accordingly.

  5. In the part class definition section, add the occurrence attributes of your MyPartClass part if needed.

  6. In the part class definition section, define the symbol icon property.

    Because of a software limitation, the symbol icon property value does not get populated when the report is run. Hence, in the Index sheet you need to explicitly provide the symbol icon name for the partclass before the report is run. So when the report is run the Symbol icon property value is readily available.

    • The PartClassName keyword needs to be in column A, and the SymbolIconPath keyword needs to be in the column B.

Step 5: Modify the SP3DReport_Definition Sheet

This sheet has xml documents embedded as comments. You must modify the embedded xml in cell A1 for the dimensional attributes. Add dimensional attributes as needed only in the places indicated by the bold text.

<?xml version="1.0" encoding="windows-1252"?>
<EXCEL_LAYOUT_DEFINITION xmlns="x-schema:ExcelLayout.xsd" FillingMode="CopyDown" SheetName="Sheet1">
  <HEADER StartRow="1" EndRow="8" RepeatOnNew="No"/>
  <ITEMS>
    <ITEM Name="PartData" ParentItem="" ItemRowsSpacing="0" ItemRowsSpreading="1" RecordsPerPage="0">
      <ATTRIBUTES>
        <ATTRIBUTE Name="IndustryCommodityCode" IsLocked="No"/>
        <ATTRIBUTE Name="CommodityType" IsLocked="No"/>
        <ATTRIBUTE Name="GeometryType" IsLocked="No"/>
        <ATTRIBUTE Name="GraphicalRepresentationOrNot" IsLocked="No"/>
        <ATTRIBUTE Name="SymbolDefinition" IsLocked="No"/>
        <ATTRIBUTE Name="MaterialGrade" IsLocked="No"/>
        <ATTRIBUTE Name="LiningMaterial" IsLocked="No"/>
        <ATTRIBUTE Name="BendRadius" IsLocked="No"/>
        <ATTRIBUTE Name="BendRadiusMultiplier" IsLocked="No"/>
        <ATTRIBUTE Name="MirrorBehaviorOption " IsLocked="No"/>
        <ATTRIBUTE Name="GeometricIndustryStandard" IsLocked="No"/>
        <ATTRIBUTE Name="PartDataBasis" IsLocked="No"/>
        <ATTRIBUTE Name="ValveManufacturer" IsLocked="No"/>
        <ATTRIBUTE Name="ValveModelNumber" IsLocked="No"/>
        <ATTRIBUTE Name="ValveTrim" IsLocked="No"/>
        <ATTRIBUTE Name="FlangeFaceSurfaceFinish" IsLocked="No"/>
        <ATTRIBUTE Name="SurfacePreparation" IsLocked="No"/>
        <ATTRIBUTE Name="ManufacturingMethod" IsLocked="No"/>
        <ATTRIBUTE Name="MiscRequisitionClassification" IsLocked="No"/>
        <ATTRIBUTE Name="PipingPointBasis1" IsLocked="No"/>
        <ATTRIBUTE Name="Id1" IsLocked="No"/>
        <ATTRIBUTE Name="PressureRating1" IsLocked="No"/>
        <ATTRIBUTE Name="EndPreparation1" IsLocked="No"/>
        <ATTRIBUTE Name="EndStandard1" IsLocked="No"/>
        <ATTRIBUTE Name="ScheduleThickness1" IsLocked="No"/>
        <ATTRIBUTE Name="FlowDirection1" IsLocked="No"/>
        <ATTRIBUTE Name="PipingPointBasis2" IsLocked="No"/>
        <ATTRIBUTE Name="Id2" IsLocked="No"/>
        <ATTRIBUTE Name="PressureRating2" IsLocked="No"/>
        <ATTRIBUTE Name="EndPreparation2" IsLocked="No"/>
        <ATTRIBUTE Name="EndStandard2" IsLocked="No"/>
        <ATTRIBUTE Name="ScheduleThickness2" IsLocked="No"/>
        <ATTRIBUTE Name="FlowDirection2" IsLocked="No"/>
        <ATTRIBUTE Name="PipingNote1" IsLocked="No"/>
        <ATTRIBUTE Name="DryWeight" IsLocked="No"/>
        <ATTRIBUTE Name="DryCogX" IsLocked="No"/>
        <ATTRIBUTE Name="DryCogY" IsLocked="No"/>
        <ATTRIBUTE Name="DryCogZ" IsLocked="No"/>
        <ATTRIBUTE Name="WaterWeight" IsLocked="No"/>
        <ATTRIBUTE Name="WaterCogX" IsLocked="No"/>
        <ATTRIBUTE Name="WaterCogY" IsLocked="No"/>
        <ATTRIBUTE Name="WaterCogZ" IsLocked="No"/>
        <ATTRIBUTE Name="SurfaceArea" IsLocked="No"/>
        <ATTRIBUTE Name="VolumetricCapacity" IsLocked="No"/>
        <ATTRIBUTE Name="Npd1" IsLocked="No"/>
        <ATTRIBUTE Name="NpdUnitType1" IsLocked="No"/>
        <ATTRIBUTE Name="Npd2" IsLocked="No"/>
        <ATTRIBUTE Name="NpdUnitType2" IsLocked="No"/>
        <ATTRIBUTE Name="FacetoFace" IsLocked="No"/>
      </ATTRIBUTES>

   <QUERY_PARAMETERS>
   <XREF_PARAMETER Name="PartClassName"/>
   </QUERY_PARAMETERS>
      <SORT/>
  

   <LABELS>
   <LABEL Reference="Piping Pipe Length_Local1" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B1" LocalFormatParamPath="C1">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="BendRadius"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_BendRadius" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local2" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B2" LocalFormatParamPath="C2">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="DryCogX"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_DryCogX" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local3" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B3" LocalFormatParamPath="C3">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="DryCogY"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_DryCogY" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local4" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B4" LocalFormatParamPath="C4">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="DryCogZ"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_DryCogZ" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local5" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B5" LocalFormatParamPath="C5">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="WaterCogX"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_WaterCogX" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local6" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B6" LocalFormatParamPath="C6">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="WaterCogY"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_WaterCogY" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local7" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B7" LocalFormatParamPath="C7">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="WaterCogZ"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_WaterCogZ" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Piping Pipe Length_Local8" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B8" LocalFormatParamPath="C8">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="FacetoFace"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_FacetoFace" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Structure Member Weight_Local9" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B9" LocalFormatParamPath="C9">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="DryWeight"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_DryWeight" IsLocked="No"/>
   </LABEL>

   <LABEL Reference="Structure Member Weight_Local10" Trigger="AfterQuery" LocalLabel="Yes" LocalFormatPath="B10" LocalFormatParamPath="C10">
   <INPUT_ATTRIBUTES>
   <XREF_ATTRIBUTE Name="WaterWeight"/>
   </INPUT_ATTRIBUTES>
   <OUTPUT_ATTRIBUTE Name="lbl_WaterWeight" IsLocked="No"/>
   </LABEL>
 </LABELS>
 </ITEM>

 <ITEM Name="Plant" ParentItem="" ItemRowsSpacing="0" ItemRowsSpreading="1" RecordsPerPage="0">
 <ATTRIBUTES>
 <ATTRIBUTE Name="UserClassName" IsLocked="No"/>
 <ATTRIBUTE Name="OccClassName" IsLocked="No"/>
 <ATTRIBUTE Name="SymbolDefinition" IsLocked="No"/>
 </ATTRIBUTES>

 <QUERY_PARAMETERS>
 <XREF_PARAMETER Name="PartClassName"/>
 </QUERY_PARAMETERS>
 </ITEM>
 </ITEMS>
 <UOM_PARAMETERS>
 <XREF_PARAMETER Name="Length"/>
 <XREF_PARAMETER Name="Weight"/>
 </UOM_PARAMETERS>
 <MATRIX_PARAMETERS/>
 </EXCEL_LAYOUT_DEFINITION>

In column B, there is an embedded xml in cell B8. This xml corresponds to the FacetoFace attribute. If you need to add new attributes, copy this xml into the new attributes comment cell and edit the indicated areas.

<?xml version="1.0" encoding="UTF-8"?>
<REPORT_FORMATTING Name="Piping Pipe Length" Description="Length">
<DESIGN_TIME Progid="SP3DLabelFormatDesigner.RTFLabel" Action="" Arg=""/>
<RUN_TIME Progid="SP3DLabelsFormat.FormatLabel" Action="RTFLabel" Arg=""/>
<FORMATTING_PARAMETERS Name="Piping Pipe Length" Site="User" Path="Piping Pipe Length_Local8.rfp"/>
<LAYOUT_TEMPLATE Type="Internal"/>
<RTF_LABEL>
<POINTS/>
<VECTORS/>
<BLOCKS>
<BLOCK Action="Visible">
<TOKENS>
<PHYSICAL Column="FacetoFace" UOM="Length" Visible="yes"/>
</TOKENS>
</BLOCK>
</BLOCKS>
</RTF_LABEL>
</REPORT_FORMATTING>

Step 6: Test

Save and exit all the files that you have edited and using the Run Report Command, run the Engineering Check Report for your part class to test for problems.