The Get External Data (GED) function enables you to set the attributes or properties of the pipelines and components in a Piping Object Data (POD) file by using data contained in spreadsheets or databases. The following example shows a line list in Excel format. The line list contains a range of data to output on the isometric drawing:
LINE-REF |
PROJECT |
AREA |
PID FROM |
PID TO |
PAINT CODE |
SG-T1 |
RM100 |
DISTILLATION |
300-020 |
300-033 |
P12 |
SG-T2 |
RM100 |
DISTILLATION |
300-021 |
300-034 |
P15 |
SG-T3 |
RM100 |
COOLING WATER |
300-022 |
300-035 |
P20 |
SG-T3 |
RM100 |
DISTILLATION |
300-023 |
300-036 |
P25 |
Using the GED function, you can do the following:
-
Establish a connection to the external data source, such as the spreadsheet used in this example.
-
Specify how to link the information in the external data source to the POD file. Using the example line list, you can use the PIPELINE-REFERENCE attribute in the POD file to find the row in the spreadsheet to use. For example, you can find the row in which the LINE-REF column contains a matching value.
-
Specify the mapping of the data in the spreadsheet to the attributes in the POD file. Using the same line list example, you can map the values in the PROJECT column ito the PROJECT-IDENTIFIER attribute in the POD file.
After you have populated the attributes, you then use standard Isogen features to plot the values on the drawings or output them to a report.
How mapping works
The following example displays the pipeline attribute information for the currently opened POD file (SG-T1.POD).
To demonstrate how mapping works, review the following range of data from the example line list (in Excel format):
To import the spreadsheet data into SG-T1.POD, you must configure the PIPELINE element section of the GED configuration file to define the following:
-
The path to the external data source.
-
The SQL statement that defines the query.
-
The one-to-one mapping of the data in the spreadsheet to the appropriate pipeline attributes in the POD file.
The resulting PIPELINE element section of the GED configuration file should resemble the example below:
1 - <XLS> tag
Defines the path to the source external data. In the example above, the Excel file GetExternalData.xls is defined as the external data source.
2 - <SQL> tag
Defines the query that the software performs when the Get External Data function runs. In the example, the SQL query instructs the software to look for a value in the LINE-REF column of the external data source that matches the PIPELINE-REFERENCE attribute value in the current POD file (SG-T1.POD).
SELECT * FROM PIPELINES WHERE [LINE-REF] = '$P.PIPELINE-REFERENCE$'
When the software runs the query, it finds that the value in cell A2 of the LINE-REF column (SG-T1) matches the PIPELINE-REFERENCE in the POD file (also SG-T1). The software then applies the pipeline attributes as defined in the <EXTERNAL-MAP> tags.
3 - <EXTERNAL-MAP> tag
Specifies how the software maps the data in the spreadsheet to the attributes in the POD file. As shown in the <EXTERNAL-MAP> section of the example configuration file, Name is the POD attribute to be populated, and ExternalName is the field name in the external data source that contains the new value. The pipeline attributes in the POD file are mapped as shown in the table below:
Pipeline Attribute Name |
Original Attribute Value |
New Attribute Value as |
|
PROJECT-IDENTIFIER |
P-500 |
RM100 |
|
AREA |
AR-1 |
Distillation |
|
PIPELINE-TEMP |
Undefined |
100 |
|
PAINTING-SPEC |
PNT-1 |
P-12 |
|
MISC-SPEC1 |
Undefined |
300-020 |
|
MISC-SPEC2 |
Undefined |
300-033 |
When the Get External Data function runs, the software updates the attribute values as specified by the GED .xml configuration file.