Skip to content

Host.GetCurrentProject

Get information about the currently open project.

When is this called?

Returns ERROR with code NO_PROJECT_OPEN when no schematic project is open.

C# Usage

var result = Host.GetCurrentProject();

Request

This method takes no parameters.

Response

Field Type Required Description
projectPath string ✅ Full path to the currently open project file.
projectName string File name of the project, including extension.
projectId string Always empty in API v1. Reserved.
isModified boolean Whether the project has unsaved changes.
isReadOnly boolean When true, the file is open without a write lock. Host.SaveFile and Host.SaveProjectAs raise READ_ONLY.

JSON

The SDK serializes these JSON bodies for you.

{}
{
  "projectPath": "C:\\Projects\\valve-assembly.hdf",
  "projectName": "Valve Assembly Block A",
  "projectId": "PRJ-2025-0042",
  "isModified": true,
  "isReadOnly": true
}

JSON Schemas: Request · Response