Model.modent_saverepresentation2#

Model.modent_saverepresentation2(entity, repcomment='', repkey='', filepath='')#

Saves the contents of a modular entity representation. If entity is a subsystem entity subsystems, the representation will always be saved in HyperMesh database format (.hm).

Parameters:
  • entity (Entity) – The entity to save the reprsenation of. Valid entities are subsystem.

  • repcomment (hwString) – The comment to add to the representation object.

  • repkey (hwString) – The representation key. This is unique per subsystem.

  • filepath (hwString) – Full path and file name of the representation file.

Example#

Save the contents of subsystem with ID 3 as a representation with key “crash5” in location “C:/representations/Subsystem3_Crash5mm.hm”#
import hm
import hm.entities as ent

model = hm.Model()

model.modent_saverepresentation2(
    entity=ent.Subsystem(model,3),
    repkey="crash5",
    filepath="C:/representations/Subsystem3_Crash5mm.hm"
)