AddContributor

Description: Adds a contributor to a container.
Returns: Nothing
Usage: Script Only.
Function Groups: Containers and Contributors
Related to: DeleteContributor |GetContributors |PContributor |
Format: \AddContributor(HandleName, ArrayName, CountName, ContainerObj, ContributorObj, IndexAddress, Value, CountIncrement, ContributorType);
Parameters:  
HandleName
Required. Any expression that evaluates to the name of the handle variable in the container module.
ArrayName
Required. Any expression that evaluates to the name of the variable in the ContainerObj parameter, that holds an array of values to which the contributor is to be added.

The ArrayName parameter may be invalid if there is no such array in the container.
CountName
Required. Any expression that evaluates to the name of the variable in the ContainerObj parameter, that holds a count of the current number of this type of contributor.

CountName may be invalid if no such variable exists in the ContainerObj. Not all contributors need to be counted.

Note that CountIncrement determines the initial change in the count and the contributor must maintain the count.
ContainerObj
Required. Any expression that evaluates to the object value of the container tag module.
ContributorObj
Required. Any expression that evaluates to the object value of the new contributor to add to the container.
IndexAddress
Required. Any expression that evaluates to the address pointer of the variable holding the contributor index.
Value
Required. May be Invalid. Any expression that evaluates to the current numeric value to set in the container's ArrayName array.

Value may be Invalid. Value may also be updated at any time by the contributor by scoping into the ArrayName array in the container, and setting the array element at the index that will be set in the variable pointed to by IndexAddress.
CountIncrement
Required. Any expression that evaluates to the numeric value that will be added to the variable in the container that has the same name as CountName.
CountIncrement's value is usually a "1" or a "0", indicating whether the contributor is actively contributing its value. The contributor will increment or decrement the value of the CountName variable as the corresponding state of the contributor changes.
ContributorType
Optional string identifier.
Using an alarm contributor as an example, this is might be "HH", "H", "LL", "L", etc.
Comments: This function can be called from the contributor.