Skip to content

Commit 704e27e

Browse files
committed
Build testing prototype of an SQLite based file / entity_instance.
1 parent 438ddc1 commit 704e27e

4 files changed

Lines changed: 491 additions & 2 deletions

File tree

src/ifcopenshell-python/ifcopenshell/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
from . import guid
7272
from .file import file
7373
from .entity_instance import entity_instance, register_schema_attributes
74+
from .sql import sqlite, sqlite_entity
7475

7576
READ_ERROR = ifcopenshell_wrapper.file_open_status.READ_ERROR
7677
NO_HEADER = ifcopenshell_wrapper.file_open_status.NO_HEADER
@@ -114,6 +115,8 @@ def open(path: "os.PathLike | str", format: str = None) -> file:
114115
return open(zf.extract(name, unzipped_path))
115116
else:
116117
raise LookupError(f"No .ifc or .ifcXML file found in {path}")
118+
if format == ".ifcSQLite":
119+
return sqlite(path)
117120
f = ifcopenshell_wrapper.open(str(path.absolute()))
118121
if f.good():
119122
return file(f)

0 commit comments

Comments
 (0)