OpenStudio Load Measure component error

Hi all,

I have a measure that takes 2 float inputs. When I re-open the file it breaks. The input values are 0. Disable/Enable doesn’t fix it. I have to recreate the component which prevents me from using measures effectively. See image below and attached file. Any idea what may be causing the problem?

Measure Error.gh (20.9 KB)measure.rb (3.5 KB)
measure.xml (2.7 KB)

@LelandCurtis ,
I am unable to recreate the error on my end. Both components work fine when I point it to the valid version of the measure that I have on my hydra:


Note that only the XML is not enough to load the measure. You need both the XML and the .rb file.

If that is not the error, could you give me more information about what you did right before you experienced the error?
Also, can you confirm that you’re using Rhino 6?

@chris I am using R6. OS 2.4.0 The component works fine when I load it the first time. It adjusts the inputs and renames itself. Hovering over the inputs shows it correctly as a float value.

However, after closing the file and reopening in R6, when I hover over the inputs I notice the values are 0, not a fraction. I notice your image shows the input values at 0. Try making them some other value and check the inputs. Again, this error only occurs when the file is reopened. Starting fresh everything works perfectly.

Also, I notice you have icons displayed. If you look at the detailed name, you will notice that upon reopening the component has been renamed “importOSMeasure” rather than maintaining the longer measure title it was automatically renamed as when first created.

1 Like

@LelandCurtis ,

I apologize that I might have responded to quickly and I did not understand that you weren’t trying to set the measure values to 0.

I can recreate the error now and I will investigate. It must be an issue with how it loads the measure back from the file. I’ll post back soon.

@LelandCurtis ,
So, first, I realized that you were using an old version of the component. If you were using the latest version, you would not get the inputs set to 0 and you would see the correct error, which is that it cannot load the measure correctly and you should get a fresh component.

In any case, I pushed a fix that should enable the component to keep working when you open it in a new file (as long as you don’t change the measure folder that is connected to it:

Measure Error.gh (477.8 KB)

Let me know if you have any issues with this version.
-Chris

Works great. Thanks Chris.

2 Likes