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

Revision history [back]

click to hide/show revision 1
initial version

set vertices using OpenStudio API

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 = OpenStudio::Point3d.new(1,1,1)
sh1.setVertices(p)
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?

set vertices using OpenStudio API

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 = OpenStudio::Point3d.new(1,1,1)
sh1.setVertices(p)
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?