Model.metadatamarkint#

Model.metadatamarkint(collection, name, value)#

Creates integer metadata on the specified collection of entities.

Parameters:
  • collection (Collection) – The collection containing the entities to which the metadata will be added.

  • name (hwString) – The name by which the metadata will be referenced.

  • value (int) – The integer value assigned to the metadata.

Example#

Add metadata named “Int_Val” with the value 5 to elements with IDs 1 - 100#
import hm
import hm.entities as ent

model = hm.Model()

model.metadatamarkint(
    collection=hm.Collection(model, ent.Element, list(range(1, 101))),
    name="Int_Val",
    value=5,
)