Deleting/Updating daily profiles?

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
sambit727
VE Newbie
VE Newbie
Posts: 1
Joined: Thu Apr 22, 2021 8:59 pm

Deleting/Updating daily profiles?

Post by sambit727 »

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

Re: Deleting/Updating daily profiles?

Post by Rhind »

Hi,

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()
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.
Post Reply