Model.unlockentities#

Model.unlockentities(collection, dataname)#

Removes entity locks for a selection of entities.

Parameters:
  • collection (Collection) – The collection containing the entities to unlock.

  • dataname (hwString) – The dataname to unlock. Currently only supported for id.

Example#

Unlock the displayed element IDs#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the displayed elements
collection_disp_elements = hm.CollectionByDisplayed(model, ent.Element)

model.unlockentities(collection=collection_disp_elements, dataname="id")