GrpMath

Performs mathematical operations on two groups, and stores the result in another group. You can add the two groups, subtract one from the other, or perform Boolean AND, NOT, and XOR operations on the two groups.

Syntax

**GrpMath**(*hResult, hOne, hTwo, Type*)

*hResult:*

The group number where the result is placed.

*hOne:*

Number of first group used in the mathematical operation.

*hTwo:*

Number of the second group used in the mathematical operation.

*Type:*

Type of mathematical operation:

*0* - Add groups one
and two.

*1* - Subtract group
two from group one.

*2* - AND groups one
and two.

*3* - NOT groups one
and two.

*4* - XOR groups one
and two.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

Example

hOne=GrpOpen("Plantwide",0);

hTwo=GrpOpen("Section1",0);

hResult=GrpOpen("Result",0);

! Subtract Section1 from Plantwide and place in Result.

GrpMath(hResult,hOne,hTwo,1);

See Also