Resolve "Create method to adjust the units of the project"
Closes #23 (closed)
setUnits(self, leng: str = "mm", freq: str = "GHz", time: str = "s", temp: str = "Kelvin")
vba = (
'With Units\n' +
'.SetUnit "Length", "{}"\n'.format(leng) +
'.SetUnit "Temperature", "{}"\n'.format(temp) +
'.SetUnit "Voltage", "V"\n' +
'.SetUnit "Current", "A"\n' +
'.SetUnit "Resistance", "Ohm"\n' +
'.SetUnit "Conductance", "S"\n' +
'.SetUnit "Capacitance", "pF"\n' +
'.SetUnit "Inductance", "nH"\n' +
'.SetUnit "Frequency", "{}"\n'.format(freq) +
'.SetUnit "Time", "{}"\n'.format(time) +
'.SetResultUnit "frequency", "frequency", ""\n' +
'End With'
)
self.__MWS._FlagAsMethod("AddToHistory")
self.__MWS.AddToHistory("SetUnits", vba)
Edited by Lucas POLO-LOPEZ