openstudiocoalition / OpenStudioApplication

The OpenStudio Application is a fully featured graphical interface to OpenStudio models including envelope, loads, schedules, and HVAC.
https://openstudiocoalition.org
Other
137 stars 25 forks source link

OS:Rendering:Color objects added every time the geometry tab is clicked and the model is saved again #768

Open mrdeslau opened 2 weeks ago

mrdeslau commented 2 weeks ago

Issue overview

Many OS:Rendering:Color objects are being added every time the geometry tab is clicked and the model is saved again. This is causing the .osm file to become cluttered when viewed in a text editor, especially for larger models. (See diff changes below)

image

Ideally, the model would not add these objects each time the geometry tab is clicked and saved.

To replicate - using the attached example model -

  1. Load in OS App and click the geometry tab
  2. Save as a new name
  3. Compare the two files in a text editor
  4. A new OS:Rendering:Color object will be added each time the geometry tab is selected and the model is saved again.

Possible Solution

One possible, but maybe not ideal solution would be to remove all rendering colors before a save - rendering_colors = model.getRenderingColors rendering_colors.each do |color| color.remove end

Another possible solution would be to identify which constructions or surfaces are causing these colors to be generated each time and removing just those from the model before a save.

Environment

Some additional details about your environment for this issue (if relevant):

Context

The issue is more annoying than a real problem, but it causes a visibility issue when trying to compare meaningful changes across models.

Example.zip