Model.metadatamarkstring#

Model.metadatamarkstring(collection, name, value)#

Creates string metadata on the specified collection of entities.

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

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

  • value (hwString) – The string value assigned to the metadata.

Example#

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

model = hm.Model()

model.metadatamarkstring(
    collection=hm.Collection(model, ent.Element, list(range(1, 101))),
    name="String_Val",
    value="Warped elements",
)