Model.setmarkdisplayattributes#

Model.setmarkdisplayattributes(collection, style, colortype)#

Set the display attributes (wireframe/hidden line, color, etc.) for the entities contained in a collection.

Parameters:
  • collection (Collection) – The collection containing the entities to set the display attributes. Valid entities are components.

  • style (int) –

    The desired rendering style of the entities:

    0 - Wire frame.

    1 - Hidden line.

    2 - Hidden line with mesh.

    3 - Hidden line with features.

    4 - Hidden line, transparent.

  • colortype (int) –

    Determines how the components are colored.

    0 - None

    1 - Component color

    2 - Assigned plots

    3 - Contours

Example#

Change the attributes of a component named “Front Panel” to hidden line use component color#
import hm
import hm.entities as ent

model = hm.Model()

model.setmarkdisplayattributes(
    collection=hm.Collection(model, ent.Component, "name=Front Panel"),
    style=1,
    colortype=1,
)