Replaces a fixed string in the POD file with a value that is returned by one of a number of different supported functions, including Sum, Count, Min, and Max. The Function attribute uses all of the occurrences of a specified attribute or property in the pipeline or sheet as input.
Basic syntax:
<REPLACE String=’~X01~’ Sum=’C.WELDATTRIBUTE1’ Format=’F2’/>
<REPLACE String=’~X02~’ SumBySheet=’C.WELDATTRIBUTE2’ Format=’F1’/>
The REPLACE element contains the attributes listed below.

String specifies a string in the POD file graphics to find and replace. Because all occurrences of this string are replaced during processing, it is important that the string is unique.

Function indicates the type of calculation to perform using the specified argument. The Function attribute contains an argument expressed as object.attribute, where object is defined using one of the following alpha characters: P (Pipeline), C (Component), M (Material), I (Information Element), or PGS (Pipeline Graphic Sheet).
Supported functions are listed below. An example of the basic syntax follows each function description.

Sum computes the sum of all: Sum=‟C.WELDATTRIBUTE4‟.

SumBySheet computes the sum of all occurrences of the specified: SumBySheet=‟C.WELDATTRIBUTE5‟.

Count computes the number of occurrences: Count=‟C.WELDATTRIBUTE3‟.

CountBySheet computes the number of occurrences.

Max computes the maximum (largest) of all occurrences of the specified attribute in the POD file: Max=‟C.REPEATWELDIDENTIFIER‟.

MaxBySheet computes the maximum (largest) of all occurrences of the specified attribute in each graphics sheet in the POD file: MaxBySheet=‟C.REPEATWELDIDENTIFIER‟.

Min computes the minimum (smallest) of all occurrences of the specified attribute in the POD file: Min=‟C.REPEATWELDIDENTIFIER‟.

MinBySheet computes the minimum (smallest) of all occurrences of the specified attributed in each graphics sheet in the POD file: Min=‟C.REPEATWELDIDENTIFIER‟.

Substitute replaces all occurrences of "String" with the specified value: Substitute="PGS.Count".

SubstituteBySheet replaces all occurrences on each sheet with the specified value. The argument to the function should be something that varies on each sheet, such as the sheet number: SubstitueBySheet="PGS.NUMBER".


Format specifies the output format for any computed numbers. In the table below, n is the precision specifier. Typically, this value indicates the number of digits or decimal places to use in the output. If Format is not defined, the default value is N. You can use upper or lower case for the attribute string.
Format String
Name
Description
Cn
Currency
The number is converted to a string that represents a currency amount. The number is output using the local currency unit.
Dn
Decimal
The number is converted to a string of decimal digits (09), prefixed by a minus sign (  ) if the number is negative. The precision specifier indicates the minimum number of digits in the resulting string. If required, the number is padded with zeros to its left to produce the number. This format is supported only for integer types.
En
Scientific
(exponential)The number is converted to a string using the format d.ddd...E+ddd or d.ddd...e+ddd, where each d indicates a digit (09). The string is prefixed with a minus sign (  ) if the number is negative. One digit always precedes the decimal point. The precision specifier indicates the number of digits needed after the decimal point. If the precision specifier is omitted, a default of six digits after the decimal point is used. The case of the format specifier indicates whether to prefix the exponent with an E or an e. The exponent always consists of a plus or minus sign and a minimum of three digits. The exponent is padded with zeros to meet this minimum, if required.
Fn
Fixedpoint
The number is converted to a string using the format ddd.ddd..., where each d indicates a digit (09). The string is prefixed with a minus sign (  ) if the number is negative. The precision specifier indicates the required number of decimal places. For example, the string F2 outputs 1 as 1.00.
Gn
General
The number is converted to the most compact of fixedpoint or scientific notation, depending on the type of the number and whether a precision specifier is present. If the precision specifier is omitted or set to zero, the number type determines the default precision, as indicated by the following list.
Byte or SByte: 3
Int16 or UInt16: 5
Int32 or UInt32: 10
Int64 or UInt64: 19
Single: 7
Double: 15
Decimal: 29
Fixedpoint notation is used if the exponent that results from expressing the number in scientific notation is greater than 5 and less than the precision specifier; otherwise, scientific notation is used. The result contains a decimal point if required and trailing zeros are omitted. If the precision specifier is present and the number of significant digits in the result exceeds the specified precision, then the excess trailing digits are removed by rounding. If scientific notation is used, the exponent in the result is prefixed with E if the format specifier is G, or e if the format specifier is g. The exception to the preceding rule is if the number is a decimal and the precision specifier is omitted. In that case, fixedpoint notation is always used and trailing zeros are preserved.
Nn
Number
The number is converted to a string using the format d,ddd,ddd.ddd... where each d indicates a digit (09). The string starts with a minus sign if the number is negative. Thousand separators are inserted between each group of three digits to the left of the decimal point. The precision specifier indicates the required number of decimal places.
Pn
Percent
The number is converted to a string that represents a percent as defined by the NumberFormatInfo.PercentNegativePattern property or the NumberFormatInfo.PercentPositivePattern property. The precision specifier indicates the required number of decimal places.
Xn
Hexadecimal
The number is converted to a string of hexadecimal digits. The case of the format specifier indicates whether to use uppercase or lowercase characters for the hexadecimal digits greater than 9. For example, use X to produce ABCDEF, and x to produce abcdef.