Your Ad Here

The structure of the Component and Information tags is the same and is largely identical to the Pipeline Data. However, in addition to the <SQL> tag there is a <FILTER> tag, which defines a supplementary filter to be applied at each component.

The query in the <SQL> tag is executed once, when the Get External Data command starts. It is used to specify a set of data relating to all the components in the pipeline and may therefore return more than one row. Typically the PIPELINE-REFERENCE property would be specified in a $P.PIPELINE-REFERENCE$ macro in this query.

<SQL>

<!-- Query is executed once -->

SELECT * FROM COMPDATA WHERE PIPELINE = '$P.PIPELINE-REFERENCE$'

</SQL>

COMPDATA is the name of the table in the external database.

The <FILTER> tag is built up from external field names and values that allow a single row in the set of records defined by the <SQL> query to be identified.

For example, the following table contains component data:

A query of the form

 “SELECT * FROM COMPDATA WHERE PIPELINE=’APL-BUG-1’”

would return three records.

The following Filter expression might be defined

<FILTER> PART-NO = '$C.REPEAT-PART-NUMBER’ </FILTER>

The filter expression is evaluated at each component in the iso file. Any component with REPEAT-PART-NUMBER = ‘1’ would match row 1 only.

All Component, ComponentKeyPoint, ComponentLeg and Material properties and attributes may be used in Filter expressions. For example, the Component ItemCode is a property of the material with which the Component is associated. A filter of this form could be used to match a row in the external data with the specific component.

<FILTER> IC = '$M.ITEMCODE’ </FILTER>


Return to ProCAD Index

Your Ad Here