Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

GBXML Class in OpenStudio Ruby SDK

asked 2014-11-13 09:55:58 -0500

updated 2015-07-11 13:40:54 -0500

I'm trying to use the OpenStudio Ruby SDK to import with GbXML. I get a "NameError: unitialized constant" error with

If I enter the EnergyPlus translator command it works.

Creating an instance of the GbXML class also works fine.


Am I missing something in the syntax or is this class somehow missing from the Ruby SDK? Thanks for the help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-13 10:07:25 -0500

Hey @jmcneill this is a good question and one that we don't really have documented well. Basically we found issues with our Ruby and C# bindings when we had classes with the same name but in different namespaces/modules. This should be ok but rather than than fight, we simply renamed ReverseTranslator in the gbXML module to GbXMLReverseTranslator:

So in your code you would just do this instead:

HTH, Dan

edit flag offensive delete link more



Thanks for the speedy response @macumber! Is there a specific place to go to for learning any difference with the Ruby vs C++ SDKs? I was even having a bit of trouble figuring out what capitalization syntax you might use for GbXML...

jmcneill's avatar jmcneill  ( 2014-11-13 10:11:53 -0500 )edit

Unfortunately there is not right now. The Ruby bindings are essentially the same as the C++ SDK, any differences are due to code in the *.i files. So the best place to look right now is in the *.i files in the source code near the classes you are interested in. You can also ask questions here :-) Sorry there isn't a better answer for now.

macumber's avatar macumber  ( 2014-11-13 20:07:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Question Tools

1 follower


Asked: 2014-11-13 09:55:58 -0500

Seen: 286 times

Last updated: Jan 13 '15