(read/write)


This property can be used to get/set the enabled flag of the active element, which will be reflected on the circuit model. An disabled element (enabled = False) is removed from the circuit solution, but not removed from memory, which allows to bring it back by changing the status of the element to enabled (enabled = True).


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;

DSSLines = DSSCircuit.Lines;

% Compile a model        

DSSText.Command = 'Compile C:\myPath\myModel.dss';

DSSActiveElement = DSSCircuit.ActiveCktElement;

% Sets the first line of the list as the active element

if DSSLines.First > 0,

    % Checks if it's enabled

    if DSSActiveElement.Enabled ~= 0,

        % If so, disables the line

        DSSActiveElement.Enabled = 0;

    end;

else 

    disp('It seems that you have no lines!');

end;