app_save_document
Saves one open document by file path or the focused document without touching other open files, so an unwritable document cannot block an unrelated save.
Instructions
Save ONE open document: file_path, or the focused one.
app_save_all writes every open document, so one that cannot
be written, a sheet in a read-only folder say, stops a save you
never asked for. This touches only the named document, never
changes focus and never walks the workspace.
saved is measured from the file's age on disk: Altium does
not report a declined save. was_modified says whether Altium
thought there was anything to write, and it misses edits made
through scripts: a board changed only by this server's tools read
false and was saved all the same. A save Altium declines while
a command is active reads saved false; run
app_exit_active_command and retry.
Args: file_path: Absolute path of an open document. Empty saves the focused document.
Returns:
file_path, saved, was_modified and a reason
when it was not saved. NOT_OPEN when the document is not open,
since only an open document can hold unsaved edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||