Skip to content

Host.OpenProject

Ask HydroMan to open a manifold file.

When is this called?

Blocks until the file is loaded. Your own BeforeFileOpen callback runs before this returns; vetoing it yields OPEN_FAILED. If the file is already open, the existing document is returned without opening or focusing a window; with readOnly false the host may first show a modal "already in use" prompt. Fails with FILE_NOT_FOUND or OPEN_FAILED.

C# Usage

var result = Host.OpenProject(@"C:\Projects\example.mnf");

Request

Field Type Required Description
filePath string ✅ Full path to the manifold file to open.
readOnly boolean When true, open the file without a write lock. Host.SaveFile and Host.SaveProjectAs then raise READ_ONLY. The user can still use Save As.

Response

Field Type Required Description
projectPath string ✅ Path of the opened manifold.
projectName string Project name as loaded.

JSON

The SDK serializes these JSON bodies for you.

{
  "filePath": "C:\\Projects\\block.mnf",
  "readOnly": true
}
{
  "projectPath": "C:\\Projects\\block.mnf",
  "projectName": "Valve Assembly Block A"
}

JSON Schemas: Request · Response