ChangeParametersMultipleElementRect Function

 

The ChangeParametersMultipleElementRect function allows you to set parameters for multiple objects of the same type in a case loaded into the Simulator Automation Server. This function is very similar to the ChangeParametersMultipleElement function call but uses a different structure for passing the values to change. The advantages of this function is that it is processed much faster and the input Values structure is easier to create in most programming languages.

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

ChangeParametersMultipleElementRect(ObjectType, ParamList, Values)

 

Parameter Definitions

ObjectType : String The type of object for which parameters are being changed.

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.

Values : Variant Two-dimensional variant array containing variants. Each row represents an object with each column containing each field in the ParamList for that object. Each object is identified by the key fields that are in the ParamList.

 

The following figure shows the structure of the Values parameter:

 

Output

ChangeParametersMultipleElementRect only returns the first element in Output, the error string.