MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / ifc_load

Method ifc_load

src/ifcmcp/ifcmcp/core.py:239–244  ·  view source on GitHub ↗

Open an IFC file into memory. Returns confirmation string.

(self, path: str)

Source from the content-addressed store, hash-verified

237 return {"ok": True, "schema": self.model.schema, "entities": sum(1 for _ in self.model)}
238
239 def ifc_load(self, path: str) -> str:
240 """Open an IFC file into memory. Returns confirmation string."""
241 self.model = ifcopenshell.open(path)
242 self.model_path = path
243 count = sum(1 for _ in self.model)
244 return f"Loaded {path}: schema {self.model.schema}, {count} entities"
245
246 def ifc_save(self, path: str = "") -> str:
247 """Write the in-memory model to disk. Empty path overwrites the original file."""

Callers 6

ifc_loadFunction · 0.80
test_load_fileMethod · 0.80
test_save_to_new_pathMethod · 0.80

Calls 1

openMethod · 0.80

Tested by 5

test_load_fileMethod · 0.64
test_save_to_new_pathMethod · 0.64