Model.modent_reparentbymark#
- Model.modent_reparentbymark(new_parent_part_entity, collection, matrix_mode=0)#
Reparents a single or multiple modular entities under a different parent.
- Parameters:
new_parent_part_entity (Entity) – The object describing the new parent of modular entity.
collection (Collection) – The collection containing the modular entities to reparent. Valid entities are subsystems.
matrix_mode (unsigned int) –
0 - Retain absolute position
1 - Retain relative position
Example#
Reparentingthe subsystem with name “Subsystem1” under subsystem with ID 3#import hm import hm.entities as ent model = hm.Model() model.modent_reparentbymark( new_parent_part_entity=ent.Subsystem(model, 3), collection=hm.Collection(model, ent.Subsystem, "name=Subsystem1") )