0

I am using IfcOpenShell in python. When I try to createed a new file and added entity, I get the following error. How can I get rid of the error? [program]

ifc_file = ifcopenshell.file()
ifc_file.add({IfcBuildingElementProxy})

[error]

Unabled to add instance from IFC2X3 schema to file with IFC4 schema

Thanks for any help.

Amicry
  • 1

1 Answers1

0

I found my own answer. I had to set 'schema'

ifc_file = ifcopenshell.file(schema=other_ifc_file.schema)
ifc_file.add({IfcBuildingElementProxy})
Amicry
  • 1