EXECUTE statement - Intergraph Smart Isometrics - Help - Hexagon PPM

Intergraph Smart Isometrics Help

PPMProduct
Intergraph Smart Isometrics
PPMCategory_custom
Help
SPFVersion_custom
2019 (10.0)
Version_IConfig
6.0(2016)
Version_ISOGEN
13.0(2016)
Version_SPIso
7.0(2019)
Version_SPSplgn
9.0(2019)

Basic syntax:

<EXECUTE Criteria='expression'>
<!-- processing instructions -->
</EXECUTE>

You can include multiple EXECUTE statements within a PIPELINE, COMPONENT, INFORMATION, MATERIAL, or JOINT element. The GED function evaluates each EXECUTE statement separately. If a Criteria expression is present, the evaluation is conditional on the criteria expression being True.

A Criteria expression consists of a mixture of macros and VBScript statements and functions. For example, the following EXECUTE statement is evaluated only at pipe components:

<EXECUTE Criteria = "'$M.ComponentType$' = 'Pipe'">

The macro $M.ComponentType$ is evaluated at the current item, and the value of the ComponentType attribute is inserted. At a flange, the expression evaluates as:

'Flange' = 'Pipe'

Because this is False, the commands within the EXECUTE statement are not evaluated.

The following EXECUTE statement is only evaluated if the component ItemCode attribute contains the string ABC and the component is a weld neck flange.

<EXECUTE Criteria = "Instr(1,'$M.ItemCode$','ABC')>0 AND '$M.ComponentType$' = 'Flange-Weld-Neck'">

The function Instr is a standard VBScript function and returns a value greater than zero if the second string (ABC) is found in the first string (the ItemCode of the current component).

You can find documentation and other background information on VBScript at the Microsoft web site.

An EXECUTE statement with no Criteria expression is always executed.

Use of a Criteria expression is much more efficient when an SQL statement is being evaluated at each component in the POD. This is because the Criteria expression ensures that the SQL statement is only executed at relevant components. In a pipeline with several hundred components, of which only a few are of interest, this can be significant.