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

add category variable to the OS:Output:Variable in OSM file

asked 2020-08-16 20:53:51 -0500

riteshsahoo's avatar

updated 2020-08-19 07:47:53 -0500

OS:Output:Variable, {43b135e2-d424-4d12-80bb-4e407821e22b}, !- Handle Output Variable 14, !- Name *, !- Key Value Zone Ideal Loads Supply Air Total Cooling Rate, !- Variable Name Hourly; !- Reporting Frequency

I want to add a "Category" tag to the OS:Output:Variable so that i can categorize the types... I updated the openstudio core for the variable but it didnt shop up on the application . Can anyone help to show how to add a new key value pair...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-08-16 23:42:18 -0500

Are you simply wanting to attach a user-specified key/value to this OS object? If so, you can use the AdditionalProperties capability as described here for example.

edit flag offensive delete link more

Comments

I modified the code in the ReverseTranslator.cpp ...

model::OutputVariable var("Surface Average Face Conduction Heat Gain Rate", *result); var.setKeyValue(subSurface.name().get()); var.setReportingFrequency(interval); var.additionalProperties().setFeature("Category", "Others");

but i get the error : see declaration of 'openstudio::model::AdditionalProperties' use of undefined type 'openstudio::model::AdditionalProperties'

riteshsahoo's avatar riteshsahoo  ( 2020-08-17 02:31:12 -0500 )edit

I want to set additionalProperties for each Outputvariable

riteshsahoo's avatar riteshsahoo  ( 2020-08-17 02:32:57 -0500 )edit

You don't need to modify the OpenStudio C++ code, you can use the SDK via ruby/etc. as shown in the example I linked to.

shorowit's avatar shorowit  ( 2020-08-17 09:41:19 -0500 )edit

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: 2020-08-16 20:53:51 -0500

Seen: 107 times

Last updated: Aug 16 '20