Model.bagdeleteall#

Model.bagdeleteall(collection)#

Deletes all bags on collection and all of the associated entities contained within each of those bags.

Parameters:

collection (Collection) – The collection containing the entities.

Example#

Delete bags admpart1 and admmaterial1 and all entities contained within them#
import hm
import hm.entities as ent

model = hm.Model()

bag = hm.Collection(model, ent.Bag, "admpart1 admmaterial1")

model.bagdeleteall(collection=bag)