GetParameters Function (version 9)

 

The GetParameters function is used to request the values of specified fields for a particular object in the load flow case. For returning field values for multiple objects, you can use a loop to make repeated calls to the GetParameters function, and pass the object and desired field information for each object. This function is identical in setup to the ChangeParameters function, with the exception that the Values array will be updated with the values for the field variables defined in ParamList.

GetParameters(tObjectType, ParamList, Values, EString)

 

Parameter Definitions

TobjectType : String The type of object you are changing parameters for. 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. The remaining field variables in the array define which values to retrieve from Simulator. No Default.

Values : Variant A variant array storing variants. This array can store any type of information (integer, string, etc.) in each array position. Values must be passed for the key field variables in ParamList, in the same array position. The remaining field positions in the Values array can initially be filled with either empty strings or zeroes, as the values will be replaced when the function is processed. 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

GetParameters("gen", [pwBusNum, pwGenID, pwGenAGCAble], ValArray = [1, "1", ""], EString)

This function call will return the AGC Status of bus number one, generator ID number 1, in the ValArray variable. Note that the generator bus number and ID had to be passed into the function, while the remaining field could be assigned an empty string. If the bus number and ID had not been passed, an error would have been returned since Simulator would not be able to identify a generator. With a valid bus number and ID for the generator, the ValArray variable would have returned an array of the following format: ValArray = [1, "1", "Yes"].