ifcopenshell.util.schema
#
Module Contents#
- ifcopenshell.util.schema.cwd#
- class ifcopenshell.util.schema.BatchReassignClass(file: ifcopenshell.file)#
- purge(self) None #
- reassign(self, element: ifcopenshell.entity_instance, new_class: str) ifcopenshell.entity_instance #
- 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: ifcopenshell.entity_instance, new_file: ifcopenshell.file) ifcopenshell.entity_instance #
- 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: str) str #
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: ifcopenshell.entity_instance, ifc_class: str) bool #
- ifcopenshell.util.schema.reassign_class(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance, new_class: str) ifcopenshell.entity_instance #
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.