You can now select unassigned cost schedule products

This commit is contained in:
Sigma Dimensions
2023-03-29 00:32:08 +00:00
parent 53aa5e5fe0
commit 3502b560f0
5 changed files with 36 additions and 1 deletions
+7
View File
@@ -240,3 +240,10 @@ def clear_cost_item_assignments(ifc, cost, cost_item, related_object_type):
ifc.run("cost.unassign_cost_item_quantity", cost_item=cost_item, products=products)
cost.load_cost_item_quantity_assignments(cost_item, related_object_type=related_object_type)
cost.load_cost_schedule_tree()
def select_unassigned_products(ifc, cost, spatial):
spatial.deselect_all()
products = ifc.get().by_type("IfcElement")
cost_schedule = cost.get_active_cost_schedule()
selection = [product for product in products if not cost.has_cost_assignments(product, cost_schedule)]
spatial.select_products(selection)