mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 16:29:57 +00:00
Minor fix. See #854.
This commit is contained in:
@@ -761,14 +761,8 @@ class IfcImporter():
|
|||||||
self.file = ifcopenshell.open(filename)
|
self.file = ifcopenshell.open(filename)
|
||||||
break
|
break
|
||||||
elif extension == 'ifcxml':
|
elif extension == 'ifcxml':
|
||||||
# We write the IFCXML out to a regular IFC then re-read it, because
|
self.file = ifcopenshell.file(
|
||||||
# right now IfcOpenShells interface for accessing an IFCXML is very
|
ifcopenshell.ifcopenshell_wrapper.parse_ifcxml(self.ifc_import_settings.input_file))
|
||||||
# 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)
|
|
||||||
elif extension == 'ifc':
|
elif extension == 'ifc':
|
||||||
self.file = ifcopenshell.open(self.ifc_import_settings.input_file)
|
self.file = ifcopenshell.open(self.ifc_import_settings.input_file)
|
||||||
ifc.IfcStore.file = self.file
|
ifc.IfcStore.file = self.file
|
||||||
|
|||||||
Reference in New Issue
Block a user