Model.ME_ModuleOccurrenceMoveContents#
- Model.ME_ModuleOccurrenceMoveContents(source_part_entity, target_part_entity, purge_target=1)#
Moves the contents from one module part to another.
- Parameters:
source_part_entity (Entity) – The object describing the part entity whose contents are being moved.
target_part_entity (Entity) – The object describing the part entity receiving the contents.
purge_target (int) –
0 - Keep the original destination part contents alongside the moved contents.
1 - Default. Purge/delete the target module’s contents before starting the move operation.
Example#
Delete the contents in part with ID 40, and then move the contents of part with ID 30 to part with ID 40#import hm import hm.entities as ent model = hm.Model() model.ME_ModuleOccurrenceMoveContents( source_part_entity=ent.Part(model, 30), target_part_entity=ent.Part(model, 40), purge_target=1, )