Cross-Board Nets

A cross-board net is a single net that spans two or more sub-project PCBs. They're declared on the multi-board schematic and propagated to each sub-project's net list, ERC, and DRC.

get_cross_board_nets()

Lists every cross-board net declared in the container.

mbs = kicad.get_mbs_schematic()
nets = mbs.multi_board.get_cross_board_nets()

for net in nets:
    print(net.name)
    for ep in net.endpoints:
        print(f"  {ep.component_ref}.{ep.pin_number} on {ep.sub_project_uuid}")

Each net has:

  • name: canonical net name
  • endpoints: list of (sub_project_uuid, component_ref, pin_number) tuples

Returns an empty list when the project is standalone.

get_container_info()

Returns metadata about the container project that owns this MBS.

info = mbs.multi_board.get_container_info()

print(info.container_pro_path)   # Path to the container .kicad_pro
print(info.mbs_file_path)        # Path to the .kicad_mbs
print(info.container_name)

for sub in info.sub_projects:
    print(f"  {sub.name}: {sub.absolute_path}")

Each sub_projects[] entry has uuid, relative_path, absolute_path, and name. An empty container_pro_path means the schematic is not part of a multi-board container; defensive callers should check.

sync_to_pcb()

Pushes cross-board net definitions to every sub-project's PCB.

result = mbs.multi_board.sync_to_pcb()

print(result.summary)
print(f"Touched {result.sub_projects_touched} sub-projects")
print(f"Applied {result.endpoints_applied} endpoints")
print(f"Renamed {result.nets_renamed} nets")

for c in result.conflicts:
    print(f"Conflict on {c.net_name}: {c.local_names}")

Equivalent to the MBSCH "Sync to PCB" toolbar button. Idempotent on stable input. Returns aggregate counts:

FieldMeaning
sub_projects_touchedSub-projects whose PCB net list changed
endpoints_appliedPad/net edits fired
endpoints_missingEndpoints whose pad couldn't be located
nets_renamedSub-project local nets renamed to the cross-board canonical name
conflictsCases where sub-projects disagreed on the local name (alphabetically-first wins)
summaryHuman-readable summary