Increment
The Increment accessor (class ) is used to increment another attribute. Each time the attribute containing this attribute is set, another attribute, called a counter, is increased by one until a specified maximum value is reached. When this value is reached, the counter is reset to zero.
Parameters
-
Maximum: Maximum value. The value to increase is reset to 0 if it is equal to the maximum value.
-
Attribute: Attribute to increment.
-
The type of the accessor is undetermined and irrelevant.
Example
A three-state button can be implemented by using a Counter accessor linked to a MultiRep accessor. The following accessor has been added to the symbol prototype of the samples prototype library. Changing the state_incr value in the Attributes notebook page of the Group Inspector increments the state and switches its representation.