mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Allow export of type relations in IFCCSV
This commit is contained in:
@@ -53,6 +53,15 @@ def get_properties(properties):
|
||||
return results
|
||||
|
||||
|
||||
def get_type(element):
|
||||
if hasattr(element, 'IsTypedBy') and element.IsTypedBy:
|
||||
return element.IsTypedBy[0].RelatingType
|
||||
elif hasattr(element, 'IsDefinedBy') and element.IsDefinedBy: # IFC2X3
|
||||
for relationship in element.IsDefinedBy:
|
||||
if relationship.is_a('IfcRelDefinesByType'):
|
||||
return relationship.RelatingType
|
||||
|
||||
|
||||
def replace_attribute(element, old, new):
|
||||
for i, attribute in enumerate(element):
|
||||
if attribute == old:
|
||||
|
||||
Reference in New Issue
Block a user