Model.library_retrieve_rep#
- Model.library_retrieve_rep(entities, data_strings, repFolder, overwrite=True, rep_to_load='')#
Adds specific representations from a connected library.
- Parameters:
entities (EntityFullType) – The entity class stored in the library. Currently supported for parts and subsystems.
data_strings (hwStringList) – The list of strings containing UID, Library Item ID, and Representation Alias List | Representation UDM ID List.
repFolder (hwString) – The folder in which the representation exists.
overwrite (bool) – The flag defining if session information is overwritten.
rep_to_load (hwString) – The name of the alias to be loaded.
Example#
Retrieve a part representation with UID LeftInner_A of major revision A from folder C:/Temp/representations#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_libraryget_info( ent.Part, "iteminfo", ["id"], uid="LeftInner_A", major_revision="A", study_revision="-" ) model.library_retrieve_rep( entities=ent.Part, data_strings=["LeftInner_A", result[0].itemInfo[0].value, "NVH 10mm"], repFolder="C:/Temp/representations" )