proj_sync_pcb
Push schematic changes into the PCB by running the ECO update, which blocks on a modal dialog until a human confirms Execute Changes; not for unattended runs.
Instructions
Push schematic changes to PCB (ECO): Design ▸ Update PCB Document.
IMPORTANT: this is NOT silent. Altium's ECO (change-review) dialog is non-suppressible by design, so this fires the real ECO and then BLOCKS on a modal dialog until a human clicks "Execute Changes". Do not call it in an unattended/headless run: it will hang the Altium-side polling loop until someone interacts. (There is no documented silent flag; the prior implementation called a non-existent process id and silently did nothing.)
The server:
Compiles the project and records before-state mappings (matched, extra-in-schematic, extra-in-pcb).
Focuses the project's PCB and invokes
WorkspaceManager:Compare(ObjectKind=Project, Action=UpdateMe): import the schematic's changes into that PCB. The modal ECO dialog opens here.After the user accepts, recompiles and reports the after-state delta (how many components were added/removed).
THE DIRECTION DEPENDS ON FOCUS, so the tool sets it. A schematic in focus makes Altium refuse with "Cannot compare a source document against its owner project"; the PCB in focus with Action=UpdateOther updates the SCHEMATIC from the board, which is what this tool used to send, and an ECO came up with the SchDoc as the affected document. Refuses with WRONG_FOCUS when the PCB cannot be focused. Before executing, check that the ECO's affected documents are the PcbDoc.
What the result does NOT tell you: whether the dialog was accepted.
dialog_outcome_verified is always false, because the handler
returns as soon as the modal closes and cannot see which button was
pressed. components_added_to_pcb and its siblings are recounts,
so they catch a change in component PRESENCE and miss everything
else an ECO carries: footprint swaps, designator and parameter
edits, net changes. Unchanged counts therefore mean "nothing was
added or removed", not "nothing happened". To learn what the dialog
actually says, call app_list_open_dialogs, which reads Altium
over Win32 and so answers while the modal is blocking the bridge.
For unattended board population without a schematic, use
pcb_place_components instead (places geometry only: see its note
about leaving the project unsynced).
Returns: Dictionary with success, pcb_path, before/after mapping counts, components_added_to_pcb, components_removed_from_pcb, components_in_sync (component presence only, see above), and dialog_outcome_verified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||