Model.modent_deleteset#
- Model.modent_deleteset(collection, deleteSetMembers=False, deleteContents=False)#
Deletes subsystem sets. This function provides options to delete either the set members (i.e., the subsets included in the set), and/or the contents (i.e., the actual subsystems associated with each set). If no options are specified, neither the set members nor the contents are deleted (both default to 0).
- Parameters:
collection (Collection) – The collection containing the subsystemsets entities to be deleted.
deleteSetMembers (bool) – The flag to specify whether to delete subsystem subsets.
deleteContents (bool) – The flag to specify whether to delete the actual subsystems associated with each set.
Example#
Delete the subsystemset with ID 2 and its contents#import hm import hm.entities as ent model = hm.Model() subset_col = hm.Collection(model,ent.subsystemset,[2]) model.modent_deleteset(subset_col, deleteSetMembers=True, deleteContents=True)