Model.duplicatemark#
- Model.duplicatemark(collection, current_collector)#
Duplicates entities.
- Parameters:
collection (Collection) – The collection containing the entities to duplicate.
current_collector (int) –
0 - New entities should be placed in the collector(s) in which the source entities exist.
1 - New entities should be placed in the current collector.
Example#
Duplicate the elements with IDs 1 - 100 and place the new elements in the current component#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements with IDs 1-100 filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 101))) elements_collection = hm.Collection(model, filter_elements) model.duplicatemark(collection=elements_collection, current_collector=1)