This property sets/gets the SwtControl flag for indicating if it is locked. The lock prevents both manual and automatic switch operation.


% Create DSS object

DSSObject = actxserver('OpenDSSEngine.DSS')

if ~DSSObject.Start(0),

                    disp('Unable to start openDSS');



DSSText = DSSObject.Text;

DSSCircuit = DSSObject.ActiveCircuit;

% Compile a model        

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

DSSSwtCtrl = DSSCircuit.SwtControls;

% activates the first SW of the list

i = DSSSwtCtrl.First;

% Check if the SW is locked

if DSSSwtCtrl.IsLocked,

                    disp('The SW is Locked');