Runtime error (ArgumentException): Instance property 'Item008' is not defined for type

Hi @mostapha, @chris, @ChienSiHarriman,

So this problem came from the exportToOpenStudio component. What I was trying to do is to convert this component to a function so that I can use this function somewhere. So this is what I did:

  1. indent the original codes by four spaces
  2. add def func(): before the first line
  3. Add return the end of the line.

However, after these steps, it gave me the error as follows:

I am not sure what has caused this issue since the only thing I did was to attampt to convert it to a function. Any help would be really appreciated. Modified code is attached: (336.6 KB)

Thank you all,


This is an interesting approach actually! I never thought of it but technically you should be able to wrap the whole component code in as larger function. It won’t be clean but it should work.

At the same time if you want to do that you have to define the input values as global variables or pass them directly to your wrapper function.

Hello @mostapha,

Thank you for your reply!

This approach works for most of the GH/LB components I believe, however, plugins like exportToOpenStudio did not work as intended and it gave me the error as shown above. I am wondering if you would be able to help me to identify the source of the problem?

Thank you @mostapha


I’m afraid I won’t be able to have a closer look before ~April 25. Hopefully my schedule will be more relaxed afterwards and I can help you with this issue if you haven’t solved it already.

Hello @mostapha,

Thank you for your reply. I will try my best to solve this myself or try other alternatives. If I have not figured out solutions by April 25 I will certainly let you know. However, I do need to find a solution as soon as possible so that I can move forward with the parametric studies that require calling HB/LB plugins iteratively. Anyhow, thank you so much for your help!



1 Like