Trying to understand the flow of Ruby and Measures
Okay, I'm not a neophyte. I have a little programming, e.g. PHP, Javascript. Am learning how to code in Ruby when I have a free moment. Just standardized on Sketchup, OpenStudio, and EnergyPlus for my energy modeling platform. I'm trying to understand how Ruby works with OpenStudio. I understand the classes and defs, and am slowly learning how Ruby uses them. What I seem to be missing is how Ruby scripts (.rb) files interact with OpenStudio and how to use them.
I've searched for some documentation but have only come up with "You can use ruby scripts to do . . .", which is exciting except I can't seem to find out "how" to use them.
Can someone point me to documentation that doesn't need a PhD to read and understand?
Thanks, Mark
Could you give us a bit of information about what you want to do?
I do energy audits on commercial and multifamily properties to show how they can reduce their energy use. This platform also support the various incentives that could help pay for the improvements. We are also doing new construction, but usually it's after the design phase or maybe install phase. We want to change that.
I'm learning Ruby and React for use with our home automation platform, and since Ruby is used to customize measures, it'll be a good fit. I saw one example of how a Ruby measure worked. Now I'm looking for the manual for the SDK so I know what function to call what and how.
here's a link to some measures if you want to use as examples, etc measures
I think the best place to start would be the measure writing guide David linked to, the OpenStudio Command Line Interface (CLI) documentation, and then looking at some example measures. The measures Brian linked to are good, you can also look on the BCL. The easiest way to start running measures is with the OpenStudio Application, once you get the hang of that it is easy to transition to the CLI.
The full API documentation is a good reference once you are started.