(read only)


This property returns the voltages in magnitude, angle format as a variant array of doubles.


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,

    % Gets the voltages (mag, angle)

    myV = DSSActiveElement.VoltagesMagAng;

    % Formats the array as matrix (col 1 mag, col 2 angle)

    mySize = size(myV);

    myVMat = []

    for a = 1:2:mySize(2),

        CNum = [myV(a), myV(a + 1)];

        myVMat = [myVMat;CNum];

    end;

else 

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

end;