You can now view & and highlight cost items assigned to an object, from Viewport Selection

This commit is contained in:
Sigma Dimensions
2023-03-29 00:41:59 +00:00
parent 3502b560f0
commit 7850f8c718
8 changed files with 171 additions and 27 deletions
+11
View File
@@ -247,3 +247,14 @@ def select_unassigned_products(ifc, cost, spatial):
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)
def load_product_cost_items(cost, product):
cost.load_product_cost_items(product)
def highlight_product_cost_item(spatial, cost, cost_item):
cost_schedule = cost.get_cost_schedule(cost_item)
is_cost_schedule_active = cost.is_cost_schedule_active(cost_schedule)
if is_cost_schedule_active:
cost.highlight_cost_item(cost_item)
else:
return "Cost schedule is not active"