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

Method ifc_save

src/ifcmcp/ifcmcp/core.py:246–253  ·  view source on GitHub ↗

Write the in-memory model to disk. Empty path overwrites the original file.

(self, path: str = "")

Source from the content-addressed store, hash-verified

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."""
248 model = self._require_model()
249 target = path if path else self.model_path
250 if not target:
251 raise IfcSessionError("No path specified and no original path available.")
252 model.write(target)
253 return f"Saved to {target}"
254
255 def ifc_reset(self) -> dict[str, Any]:
256 """Drop the in-memory model."""

Callers 5

ifc_saveFunction · 0.80
test_save_no_modelMethod · 0.80
test_save_to_new_pathMethod · 0.80

Calls 3

_require_modelMethod · 0.95
IfcSessionErrorClass · 0.85
writeMethod · 0.45

Tested by 4

test_save_no_modelMethod · 0.64
test_save_to_new_pathMethod · 0.64