First time here? Check our help page!
1

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

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...

riteshsahoo's avatar
235
riteshsahoo
asked 2020-08-16 20:53:51 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2020-08-19 07:47:53 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

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.

shorowit's avatar
11.8k
shorowit
answered 2020-08-16 23:42:18 -0500
edit flag offensive 0 remove flag delete link

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
add a comment see more comments