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

set vertices using OpenStudio API

asked 2017-06-02 23:10:17 -0600

TomB's avatar

updated 2017-06-03 07:12:31 -0600

I am writing a user script, to go into the OpenStudio SketchUp plugin, to add multiple horizontal shades over a window.

I don't understand why I can't change the vertices of an ShadingSurface object through the setVertices method.

sh1 = model.getShadingSurfaces[0]
p =,1,1)
Error: #<TypeError: Expected argument 1 of type std::vector< openstudio::Point3d,std::allocator< openstudio::Point3d > > const &, but got OpenStudio::Point3d #<OpenStudio::Point3d:0x00024a...
    in SWIG method 'setVertices'>

How do I interpret that error message? Is it possible to create a ShadingSurface through the API, passing vertices to the constructor?

edit retag flag offensive close merge delete


You may want to look at Add rooftop PV measure for example. It copies the vertices from the roof surface, and offsets them vertically to create shading surfaces.

David Goldwasser's avatar David Goldwasser  ( 2017-06-03 14:23:11 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-06-03 07:11:50 -0600

It's expecting a vector (of vertices) object, not a (single) vertex object.

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

Training Workshops

Question Tools

1 follower


Asked: 2017-06-02 23:10:17 -0600

Seen: 209 times

Last updated: Jun 03 '17