I made a script that reads an excel template I made and create daily and weekly profiles in large batches in IES. The VEProfile component of the API allowed me to do this using the set_data() method.
However, there are no methods that allow me to delete profiles or update them in any way - this could be really useful as it would allow me to modify my script such that if it tries to create daily profiles that already exist (possibly if the names are same?), it would ask whether you want to update the existing profile or cancel running the script.
I'm asking this because once you create the profile and assign it to templates, it would be tedious to have to update them by creating new ones with the script and reassign them to the template.
Does this delete/update functionality exist, and if not, was this a deliberate choice? Is there any way this update/delete functionality could be added to the API? Thanks.
Deleting/Updating daily profiles?
Re: Deleting/Updating daily profiles?
Hi,
You can modify existing profiles by loading existing ones, modifying them and then saving the changes.
Example for loading:
Where dayprofiles, groupprofiles are dictionaries of key=profile ID, value=VEProfile object.
You can call .set_data() on VEProfile objects to modify them and then project.save_profiles() to commit the changes.
Hope that helps.
You can modify existing profiles by loading existing ones, modifying them and then saving the changes.
Example for loading:
Code: Select all
project = iesve.VEProject.get_current_project()
dayprofiles, groupprofiles = project.profiles()You can call .set_data() on VEProfile objects to modify them and then project.save_profiles() to commit the changes.
Hope that helps.

