ifcopenshell.util.schema#

Module Contents#

ifcopenshell.util.schema.cwd#
class ifcopenshell.util.schema.BatchReassignClass(file)#
purge(self)#
reassign(self, element, new_class)#
unbatch(self)#
class ifcopenshell.util.schema.Migrator#
find_equivalent_attribute(self, new_element, attribute, element, attributes_mapping, reverse_mapping=False)#
generate_default_value(self, attribute, new_file)#
migrate(self, element, new_file)#
migrate_attribute(self, attribute, element, new_file: ifcopenshell.file, new_element, new_element_schema)#
migrate_attributes(self, element, new_file, new_element, new_element_schema)#
migrate_class(self, element, new_file)#
ifcopenshell.util.schema.get_fallback_schema(version)#

fallback to the schema version we do have docs and mapping for, needed to support IFC versions like 4X3_RC1, 4X1 etc

ifcopenshell.util.schema.get_subtypes(entity)#
ifcopenshell.util.schema.is_a(entity, ifc_class)#
ifcopenshell.util.schema.reassign_class(ifc_file, element, new_class)#

Attempts to change the class (entity name) of element to new_class by removing element and recreating a similar instance of type new_class with the same id.

In certain cases it may affect the structure of inversely related instances: - Multiple occurrences of reassigned instance within the same aggregate

(such as start and end-point of polyline)

  • Occurrences of reassigned instance within an ordered aggregate (such as IfcRelNests)

It’s unlikely that this affects real-world usage of this function.