Model.ME_ModuleOccurrencePurge#
- Model.ME_ModuleOccurrencePurge(part_entity, recursive=1, reset_representation=0, udm_id="", excluded_entity_types=std::vector< EntityFullType >())#
Empties the contents of a module part or part assembly.
- Parameters:
part_entity (Entity) – The object describing the part entity to purge. The module must be an occurrence.
recursive (int) –
0 - Purge only the local module’s contents. Do not touch the child module’s contents (in the case of a part assembly).
1 - Recursively purge the module, as well as any child modules.
reset_representation (int) –
0 - Keep representation reference information.
1 - Remove representation reference information.
udm_id (hwString) – The string ID from a UDM XML file for this part, if necessary.
excluded_entity_types (_EntityFullTypeList_vector) – The list of entity classes to not remove.
Example#
Purge the part with ID 168 and any of its children recursively#import hm import hm.entities as ent model = hm.Model() model.ME_ModuleOccurrencePurge(part_entity=ent.Part(model, 168), recursive=1)