AddType

<< Click to Display Table of Contents >>

 

AddType

AddType([Name], [Function], [Caption], [ElectricalPhase], [SortOrder])

Adds a Command Type object with the name informed in the Name parameter in the collection of Command Types. If the informed name already exists in that collection or is omitted, it is auto-incremented. This name cannot start with the reserved character of an asterisk (*). Please check the general Name property for more information about the allowed characters on the names of objects. The Function parameter indicates the Command Type created, which can be 0 (zero, Discrete Command) or 1 (one, Step Command). This parameter is optional and, if omitted, configures the Command Type as 0 (zero). The Caption parameter informs a description for the Command Type. This parameter is optional and, if omitted, configures that description as an empty String. The ElectricalPhase parameter indicates an electrical phase for the Command Type. This parameter is optional and, if omitted, configures that electrical phase as -1 (minus one, epNone). The SortOrder parameter informs a viewing order for the Command Type, used to sort Command Types on lists. This parameter is optional and, if omitted, configures that viewing order with the value 1000.

This method returns a Command Type object if successful.

Was this page useful?