1

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

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.

Pouya Kary's avatar
369
Pouya Kary
asked 2016-03-13 13:15:49 -0500, updated 2016-03-13 16:17:23 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

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.

macumber's avatar
12k
macumber
answered 2016-03-14 09:20:07 -0500, updated 2016-03-14 09:24:30 -0500
edit flag offensive 0 remove flag delete link

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
add a comment see more comments