Page 1 of 1

RadianceIES

Posted: Tue Aug 27, 2024 8:55 am
by Josef_UIBK
Ist there any chance to access the RadianceIES Material information via VECdbConstruction, Layer, Material? The set_properties() Method of VECdbMaterial has following properties:

angular_dependence
conductivity
density
description
inside_emissivity
inside_reflectance
inside_visible_reflectance
outside_emissivity
outside_reflectance
outside_visible_reflectance
refractive_index
specific_heat_capacity
surface_type
thickness
transmittance
vapour_resistivity
visible_transmittance

but changing the reflectance values for the first material doesn't change anything. Here is my Code:

Code: Select all

def set_insulation_layer_properties(construction_ids, layer_changes, material_changes, type):
   
    # Get the CdB project database
    cdb = iesve.VECdbDatabase.get_current_database()
    projects = cdb.get_projects()                          # returns a dict
    project_list = projects[iesve.project_types.project]   # access the project item in the dict
    project = project_list[0]                              # we need the first item in the list
    #print(project.get_construction_ids(iesve.construction_class.none))

    for id in construction_ids:
        construction_object = project.get_construction(id, iesve.construction_class.none)
        construction_properties = construction_object.get_properties()
        if construction_properties['category'] == type:
            #print(id)
            if construction_object.is_editable:
                layer = construction_object.get_layers()[0]
                layer_material = layer.get_material(True)   # Opaque layer true
                    # Check it is not a cavity layer
                if layer_material:
                    material_properties = layer_material.get_properties()
                    layer_material.set_properties(material_changes)

if __name__ == '__main__':

    # This is a unit test to check the functions using the current body selection set
    # Select some bodies in the VE then run the script

    project = iesve.VEProject.get_current_project()
    model = project.models[0]
    bodies = model.get_bodies(False)

    material_changes = {#'angular_dependence': ,
                        #'conductivity': ,
                        #'density': ,
                        #'description': ,
                        #'inside_emissivity': ,
                        'inside_reflectance':  0.66,
                        'inside_visible_reflectance': 0.66,
                        #'outside_emissivity': ,
                        'outside_reflectance': 0.66,
                        'outside_visible_reflectance': 0.66,
                        #'refractive_index': ,
                        #'specific_heat_capacity': ,
                        #'surface_type': ,
                        #'thickness': ,
                        #'transmittance': ,
                        #'vapour_resistivity': ,
                        #'visible_transmittance': 
                        }
    type = iesve.element_categories.wall
    set_insulation_layer_properties(construction_id_list, material_changes, type)
    
So the code just runs fine. But i don't see any changes, also if i use the get_properties() on material, there are actually only following properties:

'id': 'STD_SM1',
'description': 'Rainscreen',
'specific_heat_capacity': 450.0,
'category': iesve.material_categories.metals,
'conductivity': 50.0,
'density': 7800.0,
'vapour_resistivity': -1.0

This ones i can change, but i need to change the reflactance values... and as shown in the API https://help.iesve.com/ve2021/6_1_25_1_ ... M0&mw=MjQw

it shuld be possible to change also other properties.

Thx

Re: RadianceIES

Posted: Tue Aug 27, 2024 9:12 am
by Josef_UIBK
So far i figured out that the property attributes i want to change with the set_properties() method from VECdbMaterial are only existing for ext_glazing. But i need to change the following values within RadianceIES

Image