Fix bug where you couldn't add type instances for IFC4

This commit is contained in:
Dion Moult
2021-04-01 15:03:42 +11:00
parent 76568ea67c
commit 0387c778f4
2 changed files with 117 additions and 113 deletions
@@ -24,6 +24,10 @@ with open(filepath) as fp:
is_in_where_rule = True
elif entity and is_in_where_rule and "IN TYPEOF" in line and "RelatingType" in line:
type_class = line.split("'")[1].split(".")[1]
if type_class == "IFCTRANFORMERTYPE":
# Fix typo in schema
type_class = "IFCTRANSFORMERTYPE"
type_class = schema4.declaration_by_name(type_class).name()
entity_to_type_map.setdefault(entity, []).append(type_class)
line = fp.readline()