Qto module now has various qto methods you can do to bulk populate quantities

This commit is contained in:
Dion Moult
2021-05-14 15:13:24 +10:00
parent 7c6e7996ff
commit ae7d123aa2
7 changed files with 111 additions and 0 deletions
@@ -10,6 +10,13 @@ class Usecase:
def execute(self):
if self.settings["product"].is_a("IfcObject"):
for rel in self.settings["product"].IsDefinedBy or []:
if (
rel.is_a("IfcRelDefinesByProperties")
and rel.RelatingPropertyDefinition.Name == self.settings["Name"]
):
return rel.RelatingPropertyDefinition
qto = self.file.create_entity(
"IfcElementQuantity", **{"GlobalId": ifcopenshell.guid.new(), "Name": self.settings["Name"]}
)