mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
- Add button to generate cost schedule
- Feature to view, edit and add cost item values. ( Right Click - Edit ).
This commit is contained in:
@@ -245,6 +245,20 @@ def get_cost_item_assignments(
|
||||
for product in get_cost_assignments_by_type(nested_cost_item, filter_by_type)
|
||||
]
|
||||
|
||||
def get_cost_values(cost_item: ifcopenshell.entity_instance) -> list[dict[str, str]]:
|
||||
results = []
|
||||
for cost_value in cost_item.CostValues or []:
|
||||
label = "{0:.2f}".format(calculate_applied_value(cost_item, cost_value))
|
||||
label += " = {}".format(serialise_cost_value(cost_value))
|
||||
results.append({
|
||||
"id": cost_value.id(),
|
||||
"label": label,
|
||||
"name": cost_value.Name,
|
||||
"category": cost_value.Category,
|
||||
"applied_value": get_primitive_applied_value(cost_value.AppliedValue) if cost_value.AppliedValue else None,
|
||||
})
|
||||
print(results)
|
||||
return results
|
||||
|
||||
class CostValueUnserialiser:
|
||||
def parse(self, formula: str):
|
||||
|
||||
Reference in New Issue
Block a user