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 2022-06-13 15:21:40 -0500

pbvb's avatar

updated 2022-06-14 08:28:28 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-06-14 10:54:43 -0500

updated 2022-06-14 10:55:13 -0500

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.

edit flag offensive delete link more

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2022-06-13 15:21:40 -0500

Seen: 187 times

Last updated: Jun 15 '22