Shading File does not match model error

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
Post Reply
mishapatel
VE Newbie
VE Newbie
Posts: 1
Joined: Tue Apr 16, 2019 11:47 am

Shading File does not match model error

Post by mishapatel »

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

Re: Shading File does not match model error

Post by Rhind »

Hi,

I ran your script on a basic model and was not able to get the problem you describe. Probably the best thing to do would be to send your model to support so they can have a look at what the problem might be.
Post Reply