Assigning glazing construction

The VE Python API allows users create simple programs using the Python Programming Language, to interact with a VE Model and/or Vista Results File
samg
VE Newbie
VE Newbie
Posts: 9
Joined: Wed Feb 21, 2018 11:03 pm

Assigning glazing construction

Post 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: :)
User avatar
Rhind
IES Staff
IES Staff
Posts: 87
Joined: Fri Mar 22, 2013 5:06 pm

Re: Assigning glazing construction

Post by Rhind »

As I understand it glazing would always be an opening rather than a surface.
samg
VE Newbie
VE Newbie
Posts: 9
Joined: Wed Feb 21, 2018 11:03 pm

Re: Assigning glazing construction

Post by samg »

So how do you assign a construction to it?
User avatar
Rhind
IES Staff
IES Staff
Posts: 87
Joined: Fri Mar 22, 2013 5:06 pm

Re: Assigning glazing construction

Post by Rhind »

I'm not aware of any way of doing that in the API currently.
samg
VE Newbie
VE Newbie
Posts: 9
Joined: Wed Feb 21, 2018 11:03 pm

Re: Assigning glazing construction

Post 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
User avatar
Rhind
IES Staff
IES Staff
Posts: 87
Joined: Fri Mar 22, 2013 5:06 pm

Re: Assigning glazing construction

Post 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.
samg
VE Newbie
VE Newbie
Posts: 9
Joined: Wed Feb 21, 2018 11:03 pm

Re: Assigning glazing construction

Post by samg »

Super, thanks!
Swinners
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Jul 25, 2019 2:21 pm

Re: Assigning glazing construction

Post 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! :?
User avatar
Rhind
IES Staff
IES Staff
Posts: 87
Joined: Fri Mar 22, 2013 5:06 pm

Re: Assigning glazing construction

Post 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.
Swinners
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Jul 25, 2019 2:21 pm

Re: Assigning glazing construction

Post 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
Post Reply