Val
(read/write)
This property set/get the value of the property. The value must be specified as string.
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;
% Compile a model
DSSText.Command = 'Compile C:\myPath\myModel.dss';
DSSLoads = DSSCircuit.Loads;
DSSElement = DSSCircuit.ActiveDSSElement;
% Sets The first load of the list as the active element
DSSLoads.First;
% Gets the kW value
mykW = str2num(DSSElement.Properties('kW').Val);
% and increases it 10%
DSSElement.Properties('kW').Val = num2str(mykW * 1.1);