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

Best way to remove modelObjects from OSM

asked 2019-06-13 13:42:09 -0500

antonszilasi's avatar

updated 2019-06-14 10:53:28 -0500

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2019-06-13 14:12:40 -0500

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
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: 2019-06-13 13:42:09 -0500

Seen: 88 times

Last updated: Jun 13 '19