Model.setreviewbymark#

Model.setreviewbymark(collection, color)#

Adds entities to the review list based on a collection.

Parameters:
  • collection (Collection) – The collection containing the entities to add to review list. Valid entities are nodes, elements, points, lines, surfaces, solids, connectors, loads, equations, systems and vectors.

  • color (int) – The color to use for review of the entity. Valid values are 1-64.

Example#

Translate node with ID 1 , 5.0 units along the y - axis#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements with IDs 1-100
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 101)))
elements_collection = hm.Collection(model, filter_elements)

model.setreviewbymark(collection=elements_collection, color=4)
model.setreviewcolormode(mode=0)
model.setreviewtransparentmode(mode=1)
model.setreviewmode(mode=1)