Page 1 of 2

Assigning glazing construction

Posted: Wed Jun 12, 2019 11:05 pm
by samg
Having trouble assigning a glazing construction using body.assign_construction(construction, surface).

Assigning a glazed construction to any surface in a simple model results in the following error:
ValueError: Could not assign construction: Invalid construction type for the surface

So the problem seems to be that the surface type is not 'ext_glazing' - all surface types in the model are either floor, ground_floor, ceiling, roof, ext_wall, or int_wall – even walls that are 100% window are not listed as surface type ext_glazing.

I tried assigning it to the opening/window object but that results in an error as it’s not a VESurface (Boost.Python.ArgumentError: Python argument types in VEBody.assign_construction(VEBody, VECdbConstruction, VEGeometry) did not match C++ signature: assign_construction(class VEBody {lvalue}, class VECdbConstruction, class VESurface).)

I've also tested the example ‘assign_to_body.py’ but there's no ext_glazing surface (if surface.type == iesve.VESurface_type.ext_glazing) and removing this if statement results in the above value error as an invalid construction for the same reason.

Any suggestions to get this working? Is there a way to input just the glazing as a surface? :? :?: :idea: :arrow: :)

Re: Assigning glazing construction

Posted: Thu Jun 13, 2019 8:13 am
by Rhind
As I understand it glazing would always be an opening rather than a surface.

Re: Assigning glazing construction

Posted: Thu Jun 13, 2019 11:15 pm
by samg
So how do you assign a construction to it?

Re: Assigning glazing construction

Posted: Fri Jun 14, 2019 8:28 am
by Rhind
I'm not aware of any way of doing that in the API currently.

Re: Assigning glazing construction

Posted: Mon Jun 17, 2019 4:57 am
by samg
I'm wondering why the example script provided in the api tries to assign a glazing construction when it's not possible. Will this functionality be added? It would be very useful! :D

Re: Assigning glazing construction

Posted: Mon Jun 17, 2019 8:19 am
by Rhind
Yes, that is a bit misleading! :D As for the functionality, I've logged it in our system for consideration by the product managers.

Re: Assigning glazing construction

Posted: Fri Jun 21, 2019 6:56 am
by samg
Super, thanks!

Re: Assigning glazing construction

Posted: Mon Jul 29, 2019 8:24 pm
by Swinners
Rhind wrote: Mon Jun 17, 2019 8:19 am Yes, that is a bit misleading! :D As for the functionality, I've logged it in our system for consideration by the product managers.
Hi Rhind, just wondering if there has been any more thought on this? We were developing some code which could quickly change party wall constructions, only to find that the assign_construction method doesn't currently work! :?

Re: Assigning glazing construction

Posted: Wed Aug 07, 2019 8:21 am
by Rhind
It does work, you just can't use it for glazed constructions (glazed constructions are applied to openings rather than bodies). You should be able to use it for walls without any problems.

Re: Assigning glazing construction

Posted: Tue Aug 20, 2019 8:25 am
by Swinners
Hi Rhind,
Would this be using: body.assign_construction(construction, surface) ?
Where
'construction' is a construction object obtained by (using a construction ID):
construction = project.get_construction('construction ID', c_class)

'surface' is the surface of a body, obtained from body.get_surfaces().

This doesn't seem to work, can you help?

Chris