First time here? Check out the Help page!
1 | initial version |
@Julien Marrec you are on the right track with getOptionalDoubleArgumentValue, because your argument is not required as indicated by the false
in OpenStudio::Ruleset::OSArgument::makeDoubleArgument('fan_pressure_rise', false)
. And you are correct that all you need to do is retrieve the double from the optional double if it is not empty?
. To do that simply use optional's get
method like this selected_fan.setPressureRise(fan_pressure_rise.get)
.
Take a look at the Measure Writing Guide. In the run section there is a deeper explanation of the optionals.