This property sets/gets the active branch by name.


% 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';

DSSTopology = DSSCircuit.Topology;

DSSLines = DSSCircuit.Lines;

% activates the first Line on the list


myBranch = DSSLines.Name;

% sets the active branch by name

DSSTopology.BranchName = myBranch;

% moves backwards 

i = DSSTopology.BackwardBranch;

% gets the name of the active branch

myNewBranch = DSSTopology.BranchName;