pcb_place_components
Place one or many footprints from PcbLibs onto a PCB in a single call, replacing Altium's modal ECO dialog for unattended population. Batch placements in one transaction with optional schematic net syncing.
Instructions
Place one or many footprints from PcbLibs onto the board in ONE call.
The scriptable substitute for ECO / Design ▸ Update PCB Document: Altium's ECO always raises a modal, so for unattended population this drops footprints straight onto the board. It resolves the board once and places every footprint in a single Altium transaction (one IPC round-trip). Pass a single-element list to place just one.
Two modes per component: geometry only (omit unique_id /
pad_nets) leaves pads unconnected (DRC flags them), good for
artwork / panelization / fiducials / placement studies; synced
(pass both) stamps the schematic UniqueId so a later ECO matches the
part and creates+assigns each pad's net for real connectivity. Read
unique_id via query_objects(eSchComponent, "Designator.Text,UniqueId") and pad_nets from the compiled
netlist (proj_get_connectivity_many → pad number → net).
board_path: target a specific .PcbDoc when several are open
(resolved once for the whole batch). Otherwise the focused board
is used.
Args:
placements: List of placement dicts, each with:
footprint (required), library_path (required, .PcbLib),
x, y (mils), designator, lib_reference, comment,
rotation, layer, unique_id, and pad_nets
({pad_name: net_name}); omit unique_id/pad_nets for
geometry-only, include them for a synced placement.
board_path: Absolute .PcbDoc path to place onto (optional).
Returns:
Dict with placed (count), failed (count), total.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_path | No | ||
| placements | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||