Model.library_save_rep#

Model.library_save_rep(collection, repDefAliasList, overwrite=True)#

Saves representations to a connected library.

Parameters:
  • collection (Collection) – The collection containing the entities for which the representation will be saved. Currently supported for parts and subsystems.

  • repDefAliasList (hwString) – The representation alias names to save.

  • overwrite (bool) – The flag defining if library information is overwritten.

Example#

Save “NVH 10mm” representation to Part library for part ID 22#
import hm
import hm.entities as ent

model = hm.Model()

part_col = hm.Collection(model, ent.Part, "id=22")

model.library_save_rep(
    collection=part_col,
    repDefAliasList="NVH 10mm",
)