mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Minor fix. See #854.
This commit is contained in:
@@ -761,14 +761,8 @@ class IfcImporter():
|
||||
self.file = ifcopenshell.open(filename)
|
||||
break
|
||||
elif extension == 'ifcxml':
|
||||
# We write the IFCXML out to a regular IFC then re-read it, because
|
||||
# right now IfcOpenShells interface for accessing an IFCXML is very
|
||||
# different for some reason. When it gets standardised, we can read
|
||||
# it directly.
|
||||
ifcxml_file = ifcopenshell.ifcopenshell_wrapper.parse_ifcxml(self.ifc_import_settings.input_file)
|
||||
with tempfile.NamedTemporaryFile() as temp_file:
|
||||
ifcxml_file.write(temp_file.name)
|
||||
self.file = ifcopenshell.open(temp_file.name)
|
||||
self.file = ifcopenshell.file(
|
||||
ifcopenshell.ifcopenshell_wrapper.parse_ifcxml(self.ifc_import_settings.input_file))
|
||||
elif extension == 'ifc':
|
||||
self.file = ifcopenshell.open(self.ifc_import_settings.input_file)
|
||||
ifc.IfcStore.file = self.file
|
||||
|
||||
Reference in New Issue
Block a user