ChangeParametersSingleElement Sample Code

 

Borland® Delphi

Var ParamList, ValueList : OLEVariant

 

// Set ParamList up to modify the maximum number of iterations

// and the system base for the power flow simulations

ParamList := VarArrayCreate([1,2], varOleStr);

ParamList[1] := 'MaxItr';

ParamList[2] := 'MVABase';

 

// ValueList is setup with 41 and 410 for MaxItr and MVABase,

// respectively

ValueList := VarArrayCreate([1,2], varOleStr);

ValueList[1] := 41;

ValueList[2] := 410;

 

// Make the ChangeParametersSingleElement call

Output = SimAuto.ChangeParametersSingleElement('Sim_Solution_Options', _

ParamList, ValueList) 

 

Microsoft® Visual Basic for Applications

' Set ParamList up to modify the maximum number of iterations

' and the system base for the power flow simulations

Dim ParamList As Variant

ParamList = Array("MaxItr", "MVABase")

 

' ValueList is setup with 41 and 410 for MaxItr and MVABase,

' respectively

Dim ValueList As Variant

ValueList = Array(41, 410)

 

' Make the ChangeParametersSingleElement call

Output = SimAuto.ChangeParametersSingleElement("Sim_Solution_Options", _

ParamList, ValueList) 

 

Matlab®

% Set ParamList up to modify the maximum number of iterations

% and the system base for the power flow simulations

ParamList = {'MaxItr' 'MVABase'};

 

% values is setup with 41 and 410 for MaxItr and MVABase,

% respectively

values = [41 410];

 

% Convert the values matrix to a set of cells for passing

% through the COM interface

ValueList = num2cell(values);

 

' Make the ChangeParametersSingleElement call

Output = SimAuto.ChangeParametersSingleElement('Sim_Solution_Options', _

ParamList, ValueList)