Re: Overwriting constructions in database
Posted: Fri Apr 12, 2019 8:53 am
There's no direct way of changing a surface type. Surface types are based on the geometry you have in your model.
Integrated Environmental Solutions
https://forums.iesve.com:443/
Code: Select all
AttributeError: 'VECdbConstruction' object has no attribute 'get_g_values'Tian, I am having this same issue. There are no surface types which are ext_glazing, and removing the if statement from that piece of code doesn't work (assigning a glazing construction to the surface on which it lies doesn't work - it results in the error "invalid construction type for the surface"). Assigning it to the opening/window object doesn't work either.Tian wrote: Fri Apr 05, 2019 9:54 pm 2. I looked at at the sample of assign_to_bodies, and the code below didnt work well, it didnt successfully assign the construction.I printed suface.type and there is no surface type as ext_glazing, so I assumed this is the reason why the construction was not assigned. So I am wondering is there a way to solve this?Code: Select all
for surface in surfaces: # Only proceed to assign a construction if it's external glazing if surface.type == iesve.VESurface_type.ext_glazing: # Get the first glazing construction we can find construction = project.get_construction(ids[0], c_class) # Assign the glazing construction to the external glazing body.assign_construction(construction, surface)
I'm running 2017 and running get_g_values() on a construction object returns an attribute error. Does this function only work in 2018?Rhind wrote: Thu May 23, 2019 8:40 am 2. Should be straightforwardly construction.get_g_values(). What version of the VE are you using? This particular method is not available in older versions of the API.
Code: Select all
AttributeError: 'VECdbConstruction' object has no attribute 'get_g_values'