mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 19:34:34 +00:00
Assign control to cost items and UX Workschedules and Costchedules cleanup
This commit is contained in:
@@ -38,7 +38,10 @@ class Data:
|
||||
del data["CostValues"]
|
||||
del data["CostQuantities"]
|
||||
data["RelatedObjects"] = []
|
||||
data["Controls"] = []
|
||||
for rel in cost_item.IsNestedBy:
|
||||
[data["RelatedObjects"].append(o.id()) for o in rel.RelatedObjects if o.is_a("IfcCostItem")]
|
||||
for rel in cost_item.Controls:
|
||||
[data["Controls"].append(o.id()) for o in rel.RelatedObjects or []]
|
||||
cls.cost_items[cost_item.id()] = data
|
||||
cls.is_loaded=True
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {"cost_item": None, "attributes": {}}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
for name, value in self.settings["attributes"].items():
|
||||
setattr(self.settings["cost_item"], name, value)
|
||||
Reference in New Issue
Block a user