app_create_document
Creates and saves a new blank PCB, schematic, library, or output job document to a specified path, attaching it to the focused project so subsequent design tools can edit the new file.
Instructions
Create a new blank document of a given kind and save it to disk.
Wraps IClient.OpenNewDocument + DoFileSave. The new document is
written to file_path and, by default, attached to the currently
focused project. Use this to create a .PcbDoc before running
update_pcb, to spin up a fresh .SchDoc, library, OutJob, etc.
Args: kind: Document kind, 'PCB', 'SCH', 'PCBLIB', 'SCHLIB', 'OUTPUTJOB', or any other kind Altium's server module registers under. file_path: Absolute path where the new document should live. Use Windows backslashes. name: Optional display name. Defaults to the filename. add_to_project: Attach the new file to the focused project. Default True. Set False to leave it as a free document.
The new document is focused before this returns, and focused
says whether that took: the library and board tools act on the
focused document, and a new one left behind the old meant the
next call wrote into the old one. A document that could not be
saved is an error (a missing folder is named), not a success with
saved: false.
Returns: Dictionary with kind, file_path, saved, focused, added_to_project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | No | ||
| file_path | Yes | ||
| add_to_project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||