First time here? Check our help page!
1

Best way to remove modelObjects from OSM

I am starting a osm by importing a floor space js json as shown in the measure here: https://github.com/NREL/floorspace.js...

Unfortunately it appears that this import by default produces OS:SimulationControl and OS:LifeCycleCost parameter objects.

I need to remove these two objects as I add my own simulation control and lifecycle cost objects later.

What is the best way of doing this? Unfortunately I couldn't derive the solution from the OpenStudio SDK.

Many thanks!

antonszilasi's avatar
1.5k
antonszilasi
asked 2019-06-13 13:42:09 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2019-06-14 10:53:28 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

4

Those are unique objects in OpenStudio, so you create them with a get method on the Model class. You can remove them like any other object:

model = OpenStudio::Model::Model.new
puts model

lccp = model.getLifeCycleCostParameters
sc = model.getSimulationControl
puts model

lccp.remove
sc.remove
puts model
macumber's avatar
12k
macumber
answered 2019-06-13 14:12:40 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments