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

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