ChangeParameters Function (version 9)
The ChangeParameters function allows you to set a list of parameters for a specific object in a case loaded into the Simulator Automation Server. In addition to changing parameters for objects, this function can also be used to set options for some of the Simulator tools, such as ATC and OPF. This function is identical in setup to the GetParameters function, with the exception that the Values array must contain a value for each field variable given in the ParamList array.
ChangeParameters(ObjectType, ParamList, Values, EString)
Parameter Definitions
ObjectType : String The type of object for which parameters are being changed. No default.
ParamList : Variant A variant array storing strings. This array stores a list of PowerWorldâ object field variables, as defined in the section on PowerWorld Object Fields. The ParamList must contain the key field variables for the specific device, or the device cannot be identified. No Default.
Values : Variant A variant array storing variants. This array can store any type of information (integer, string, etc.) in each array position. A value should be passed for each field variable given in the ParamList. The Values array must contain the key field values for the specific device, or the device cannot be identified. No Default.
EString : Variant This parameter must be assigned a variable declared as a Variant. This parameter is for a return value only, and will assign the passed variable a string representing an error that may have occurred in the Simulator Automation Server. If no error occurred, the EString variable will return an empty string.
Example
ChangeParameters("gen", [pwBusNum, pwGenID, pwGenAGCAble], [1, "1", "Yes"], EString)
This function call will change the AGC Status of bus number one, generator ID number 1, to "Yes", meaning the generator will be included in AGC if it's area is on AGC control.