ifcopenshell.api.cost.copy_cost_item
¶
Module Contents¶
- class ifcopenshell.api.cost.copy_cost_item.Usecase¶
- copy_indirect_attributes(from_element, to_element)¶
- duplicate_cost_item(cost_item)¶
- execute()¶
- ifcopenshell.api.cost.copy_cost_item.copy_cost_item(file: ifcopenshell.file, cost_item: ifcopenshell.entity_instance) ifcopenshell.entity_instance | list[ifcopenshell.entity_instance] ¶
Copies all cost items and related relationships
The following relationships are also duplicated:
The copy will have the same attributes and property sets as the original cost item
The copy will be assigned to the parent cost schedule
The copy will have duplicated nested cost items
- Parameters:
cost_item (ifcopenshell.entity_instance) – The cost item to be duplicated
- Returns:
The duplicated cost item or the list of duplicated cost items if the latter has children
- Return type:
ifcopenshell.entity_instance or list[ifcopenshell.entity_instance]
Example: .. code:: python
# We have a cost item cost_item = CostItem(name=”Design new feature”, deadline=”2023-03-01”)
# And now we have two duplicated_cost_item = project.duplicate_cost_item(cost_item)