I am trying to run adaptation of the ‘suncast_data.py’ script. I am getting an error that states the shading file does not match the model. I am certain it is the correct shading file and I have not changed the model since running the simulation.
Please can you advise me on this.
Thanks.
Code: Select all
import iesve
import pprint
pp = pprint.PrettyPrinter(indent=4)
# get current project
project = iesve.VEProject.get_current_project()
models = project.models
for model in models:
# Get a suncast object
suncast = model.suncast()
bodies = model.get_bodies_and_ids(False)
for id, body in bodies.items():
# filter rooms by type
if body.type != iesve.VEBody_type.room:
continue
print("Body:", id)
body_index=body.get_index()
print("Body Index:", body_index)
# Get all surfaces in room
surfaces = body.get_surfaces()
for surface in surfaces:
print("Surface Index", surface.index)
surface_props = surface.get_properties()
filename = project.path + "Suncast\\" + project.name + "_SolVis" + ".shd"
print(filename)
print('\nSurface:')
results = suncast.get_results(filename, body_index, surface.index, surface_props['id'])
