This property sets/gets the name of an XfrmCode, if used, that supplies electrical parameters for this Transformer. The named XfmrCode must already be defined.


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

DSSXfmr = DSSCircuit.Transformers;

% Activates the first transformer on the list

i = DSSXfmr.First;

% gets the name of the XfmrCode for the active transformer (if any)

myXfmrCode = DSSXfmr.XfmrCode;