Model.hm_plotmarker_byentity#

Model.hm_plotmarker_byentity(entity, dataname='', inputmarker='', color=1, location='centroid', display=0, precision=6)#

Creates a graphical marker.

Parameters:
  • entity (Entity) – The entity to create marker for. Valid entity types are nodes, elements, points, lines, surfaces, and solids.

  • dataname (hwString) – The data name or attribute to create markers for. If not specified, inputmarker must be used.

  • inputmarker (hwString) – Currently not supported.

  • color (int) – The color of the marker (default is 1).

  • location (hwString) – The location to place the marker. Valid for entity of type element and line only. Valid values are centroid (default) or a node index (e.g., node1, node2, etc.).

  • display (int) –

    The display label details.

    0 - value (default)

    1 - data name : value

    2 - entity_type : entity_id : data name : value

  • precision (int) – The precision of double values coming from data names. Valid only if dataname is specified. Valid values are 0-6 (default is 6). Trailing zeros are always removed (e.g. 529.70900 becomes 529.709).

Example#

Create a marker using the “id” data name for element ID 100#
import hm
import hm.entities as ent

model = hm.Model()

elem = ent.Element(model,100)

model.hm_plotmarker_byentity(entity=elem, dataname="id")
Create a marker using the “id” data name for element ID 100 using color 20 and the node3 location#
import hm
import hm.entities as ent

model = hm.Model()

elem = ent.Element(model,100)

model.hm_plotmarker_byentity(
    entity=elem,
    dataname="id",
    color=20,
    location="node3"
)