mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Cost quantities that are counting that have controlled products now automatically count the number of products for convenience
This commit is contained in:
@@ -26,9 +26,9 @@ class Usecase:
|
||||
controls = self.settings["relating_control"].Controls[0]
|
||||
|
||||
if controls:
|
||||
related_objects = list(controls.RelatedObjects)
|
||||
related_objects.append(self.settings["related_object"])
|
||||
controls.RelatedObjects = related_objects
|
||||
related_objects = set(controls.RelatedObjects)
|
||||
related_objects.add(self.settings["related_object"])
|
||||
controls.RelatedObjects = list(related_objects)
|
||||
ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": controls})
|
||||
else:
|
||||
controls = self.file.create_entity(
|
||||
|
||||
Reference in New Issue
Block a user