Model.elementconfigcolor#

Model.elementconfigcolor(config, color)#

The function sets the color for element config.

Parameters:
  • config (hwString) – The element config that is to have its color changed. This input can be specified as config number or config string label.

  • color (int) – The color that needs to be set for the config specified. This input must be specified as color number.

Examples#

Set the color of element config “ 103 “ to 2#
import hm
import hm.entities as ent

model = hm.Model()

model.elementconfigcolor(config="103", color=2)
Set the color of element config “ tria3 “ to 2#
import hm
import hm.entities as ent

model = hm.Model()

model.elementconfigcolor(config="tria3", color=2)
Set all element configurations to their default color#
import hm
import hm.entities as ent

model = hm.Model()

model.elementconfigcolor(config="0", color=0)

Note

After the color has been set, all elements of the corresponding configuration are set to the value of color.