We’ve tested scripts on multiple models and there doesn’t seem to be any consistency between the script successfully terminating and causing a crash. The script below is a fairly minimal example, it has worked in the past but after closing and reopening the model, the same script then causes a crash. I’ve had similar problems with the show_casual_gains.py example script provided with the software.
Has anyone else come across silent crashes when doing this (or any) function call and has any advice?
Code: Select all
import iesve
ve_project = iesve.VEProject.get_current_project()
# selects the real model
model = ve_project.models[0]
# gets a list of all spaces
bodies = model.get_bodies_and_ids(False)
# selects a sample room from that list
body = bodies['SP00000C'] #CHANGE BASED ON YOUR MODEL
# retrieves a list of internal gain objects associated with just a single space
test = body.get_room_data().get_internal_gains()
gain1 = test[0] # RoomLightingGain object
gain2 = test[1] # RoomPeopleGain object
gain3 = test[2] # RoomEnergyGain object
print(gain2.get())
Jon

