Model.modent_deletebymark#

Model.modent_deletebymark(collection, keep_contents=0)#

Deletes a collection of modular entities.

Parameters:
  • collection (Collection) – The collection containing the modular entities to delete. Valid entities are subsystems.

  • keep_contents (unsigned int) –

    0 - Delete all contained entities.

    1 - Keep all contained entities and move them under the main include.

Example#

Delete the subsystems with IDs 4, 6 and 8 and move the contents under the main include#
import hm
import hm.entities as ent

model = hm.Model()

model.modent_deletebymark(
    collection=hm.Collection(model, ent.Subsystem, [4, 6, 8]), keep_contents=1
)