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

Writing Measures in C#

asked 2 years ago

pbvb's avatar

updated 2 years ago

Hello All, I think I know the answer to this, but I did not find any specific information about this while searching the forum. I have successfully been able to follow the c# example that is provided in the OS example file. But I am now wondering if it is possible to call a measure (written in c#) from a workflow file.

Thanks

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 2 years ago

updated 2 years ago

Currently while the OpenStudio API support many languages, including C#, measures are specifically written in Ruby, however work is being done to also support Python for formal measures. Because measures can be run with the OpenStudio CLI to run a workflow of 1 or more measures, you can run measures from any language that supports system calls. The point of me mentioning this, is that there are very few Ruby methods used in a measure. Your framework can be C# and using the CLI and you can still make use of measures. If need to do your model manipulation in C# then you can still do that, but just with loose scripts instead of formal measures.

Preview: (hide)
link

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 223 times

Last updated: Jun 15 '22