Fix #4921. When upgrading to IFC4X3, preprocess the file to remove deprecated style assignments

This commit is contained in:
Dion Moult
2024-06-27 11:49:00 +10:00
parent 98afb72ba3
commit 48d058a32a
4 changed files with 18 additions and 3 deletions
+1
View File
@@ -46,6 +46,7 @@ class Patcher:
def patch(self):
self.file_patched = ifcopenshell.file(schema=self.schema)
migrator = ifcopenshell.util.schema.Migrator()
migrator.preprocess(self.file, self.file_patched)
for element in self.file:
new_element = migrator.migrate(element, self.file_patched)
print("Migrating", element)