(write only)


This method sets the Active Circuit Element using the full object name (e.g. "generator.g1"). Returns -1 if not found. Else index to be used in CktElements collection or AllElementNames.


Example


% Create DSS object

DSSObject = actxserver('OpenDSSEngine.DSS')

if ~DSSObject.Start(0),

                    disp('Unable to start openDSS');

                    return

end;

DSSText = DSSObject.Text;

DSSCircuit = DSSObject.ActiveCircuit;

% Sets load 'load1' as the active circuit element

if (DSSCircuit.SetActiveElement('Load.Load1')) < 0,

                    disp('The element does not exist');

                    return

end;