First time here? Check out the Help page!
1 | initial version |
Line 122 of the OsLib_HVAC.rb file is:
spaceType = space.spaceType.get
Calling the spaceType
method on a Space object returns an OptionalSpaceType object. If you try to get
and Optional type that doesn't point to an acutal object, you will recieve the 'Optional not initialized' error. See the Measure Writing Guide section on the boost:optional
type.
Based on this I would surmise you are trying to run the measure on a model that has spaces without space types assigned.
The right way to handle this case in the measure would be to check if space.spaceType.is_initialized
or if not space.spaceType.empty?
and then call space.spaceType.get
if true, and (perhaps) skip that space if false.