ChangeParametersSingleElement Function
The ChangeParametersSingleElement function allows you to set a list of parameters for a single 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 GetParametersSingleElement function, with the exception that the Values array must contain a value for each field variable given in the ParamList array.
Unlike the script SetData and CreateData commands, SimAuto does not have any explicit functions to create elements. Instead this can be done using the ChangeParameters functions by making use of the CreateIfNotFound SimAuto property. Set CreateIfNotFound = True if objects that are updated through the ChangeParameters functions should be created if they do not already exist in the case. Objects that already exist will be updated. Set CreateIfNotFound = False to not create new objects and only update existing ones. The CreateIfNotFound property is global, once it is set to True this applies to all future ChangeParameters calls.
Function Prototype
ChangeParametersSingleElement(ObjectType, ParamList, Values)
Parameter Definitions
ObjectType : String The type of object for which parameters are being changed.
ParamList : Variant A variant array storing strings (COM Type BSTR). 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 or label for the specific device, or the device cannot be identified.
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.
Output
ChangeParametersSingleElement only returns the first element in Output, the error string.
Notes
The ParameterList and Values arrays must be the same size, as each parameter must have a corresponding value to be assigned.