From feac60134039b50ae8a71e61b21cc6f7dd518fdc Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 6 Jun 2021 10:05:24 +1000 Subject: [PATCH] Fix #1513. Materials now are included when importing types from a project library. --- .../ifcopenshell/api/project/append_asset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py index a3409a0bf6..42e59d4bb1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py @@ -11,6 +11,8 @@ class Usecase: def execute(self): element = self.file.add(self.settings["element"]) + for rel in self.settings["element"].HasAssociations: + self.file.add(rel) self.existing_contexts = self.file.by_type("IfcGeometricRepresentationContext") added_contexts = [e for e in self.file.traverse(element) if e.is_a("IfcGeometricRepresentationContext")] for added_context in added_contexts: