First time here? Check out the Help page!
1 | initial version |
This needs to be documented better in the measure writing guide but there are two options:
Option 1 is to provide a default value that will be used if the user leaves the argument blank. This is done with:
argument.setDefaultValue(100)
Option 2 is to get the value using getOptionalDoubleArgumentValue, if you do this you have to check that the value is initialized before using it:
value = runner.getOptionalDoubleArgumentValue('argument', arguments)
if value.is_initialized
value = value.get
else
value = nil
end
2 | No.2 Revision |
This needs to be documented better in the measure writing guide but there are two options:
Option 1 is to provide a default value that will be used if the user leaves the argument blank. This is done in the arguments section with:
argument.setDefaultValue(100)
Option 2 is to get the value using getOptionalDoubleArgumentValue, in the run section, if you do this you have to check that the value is initialized before using it:
value = runner.getOptionalDoubleArgumentValue('argument', arguments)
if value.is_initialized
value = value.get
else
value = nil
end
3 | No.3 Revision |
This needs to be documented better in the measure writing guide but there are two options:
Option 1 is to provide a default value that will be used if the user leaves the argument blank. This is done in the arguments section with:
argument.setDefaultValue(100)
Option 2 is to get the value using getOptionalDoubleArgumentValue in the run section, if you do this you have to check that the value is initialized before using it:calling get to retrieve the value:
value = runner.getOptionalDoubleArgumentValue('argument', arguments)
if value.is_initialized
value = value.get
else
value = nil
end