Script functions reference > Script functions in alphabetical order > M > MsgProcCountId

MsgProcCountId
Syntax
MsgProcCountId(block);
block
Description
Counts the number of instances of the specified block in the current Process.
Returns
The number of blocks found.
Examples
In the following examples, the Process contains the blocks blkA, blkB, and blkC structured as shown in the figure below.Click to enlarge
Example 80
The following script returns the number of blkB blocks in the Process:
MsgProcCountId("blkB"); //Returns 4
 
Example 81
The following script returns the number of blkB blocks in the first instance of block blkA:
MsgProcCountId("blkA:1/blkB"); //Returns 2
 
Example 82
The following script sample includes a counter to specify the N:th instance of block blkA:
...
$counter = 1;
$blkBinA = MsgProcCountId("blkA:" + $counter + "/blkB");
$counter++;
...
 
OpenText StreamServe 5.6 Updated: 2013-03-01