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

Revision history [back]

Hey @xfang, I'm sorry that this happens to you, we are working on plans to help avoid these types of situations. However, in the meantime if this happens to you here are some steps you can use to try to find the problem objects in your model. When you first start SketchUp, open the Ruby console by going to "Window->Ruby Console". Then open the OSM file that you are having trouble with. You will likely see some messages like this:

Counterclockwise:  Fix unintended reversed face
Space.cleanup_entity:  unhandled swap for #<Sketchup::Face:0x203cfa44>
Space.cleanup_entity:  duplicate drawing interface for #<Sketchup::Face:0x20476aec>, #<Sketchup::Face:0x203cfa44>
DrawingInterface.create_from_entity:  create_model_object failed

This tells you that the plugin had trouble drawing SketchUp faces 0x203cfa44 and 0x20476aec. However, it doesn't tell you which OpenStudio model objects those correspond to. You can use the SketchUp Ruby API to find these. First, make an array of all SketchUp entities within groups:

all_entities = []
Sketchup.active_model.entities.each {|e| all_entities.concat(e.entities.to_a) if e.typename == "Group" }

Then loop through these looking for the problem SketchUp faces:

found_entities = []
all_entities.each {|e| found_entities << e if (e.to_s == "#<Sketchup::Face:0x1e69b838>" || e.to_s == "#<Sketchup::Face:0x1ea7cf88>")}

Finally, print the OpenStudio handle associated with these SketchUp faces:

found_entities.each {|e| puts e.model_object_handle }

You can close SketchUp, find these problem objects in your OSM using a text editor, delete the problem objects (make sure to save a backup of your OSM first!), then re-open in SketchUp. Hopefully this will allow you to get started working with your model again.