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

How to get the SketchUp group associated with the OpenStudio Space?

asked 2016-03-13 13:15:49 -0500

updated 2016-03-13 16:17:23 -0500

As always thanks a lot, mostly you Dan and David for your always supporting answers :D

I have a really huge problem going on. I want my software to compute thermal bridges hence I have implemented an editor in SketchUp for applying Psi-value to SketchUp Edge objects. Thanks to OpenStudio::Plugin.model_manager.model_interface.openstudio_model.getSurfaces[0].drawing_interface.entity that dear Dan showed me in here I can get edges of surfaces.

However the problem is for storing the data I can't use the SketchUp entity ID as they are temporary and change with each load (very horrible idea by SketchUp by the way...) so I have to make a key myself by hashing the position of the start and end of the edges.

The problem starts where these positions seems to be local within the groups. So my question is how do you get the global position of edges in the OpenStudio plugin itself? or do you have any suggestions.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-03-14 09:20:07 -0500

updated 2016-03-14 09:24:30 -0500

Once again, don't do this, the SketchUp Plug-in API is not a supported API and is subject to change. But if you need to for some crazy reason:

model = OpenStudio::Plugin.model_manager.model_interface.openstudio_model 
model.getSpaces.each {|space| puts space.drawing_interface.entity}

As for transforming between OpenStudio and SketchUp coordinates, see this.

edit flag offensive delete link more

Comments

@macumber actually unless you add the APIs for thermal bridges which since they're not implemented in energy plus you can't add them either hence remains no other way than these super crazy ones :|

Pouya Kary's avatar Pouya Kary  ( 2016-03-14 13:27:38 -0500 )edit

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: 2016-03-13 13:15:49 -0500

Seen: 160 times

Last updated: Mar 14 '16