Skip to content

Host.SaveFile

Ask HydroSym to save a schematic to its current path.

When is this called?

Returns ERROR with code NO_PROJECT_OPEN when no matching schematic is open, or READ_ONLY when it is open read-only. On a never-saved schematic this shows a modal Save As dialog. Returns saved: false when the save does not complete (the user cancels, or the write fails). Does not raise SAVE_FAILED (that applies to Host.SaveProjectAs).

C# Usage

var result = Host.SaveFile();  // optional projectPath argument

Request

Field Type Required Description
projectPath string Project path. If omitted, uses the currently open project.

Response

Field Type Required Description
saved boolean ✅ Whether the save completed.
filePath string Path the schematic was saved to.

JSON

The SDK serializes these JSON bodies for you.

{
  "projectPath": "C:\\Projects\\valve-assembly.hdf"
}
{
  "saved": true,
  "filePath": "C:\\Projects\\valve-assembly.hdf"
}

JSON Schemas: Request · Response