This property sets/gets the Carson earth return reactance per unit length used to compute impedance values at base frequency.  For making better frequency adjustments. Default is 0.155081 = 60 Hz value in ohms per kft (matches default line impedance). This value is required for harmonic solutions if you wish to adjust the earth return impedance for frequency. If not, set both Rg and Xg = 0.


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

DSSLines = DSSCircuit.Lines;

% activates the first line on the list


% Gets Xg for the active line

myXg = DSSLines.Xg;