by adom
Let an AI (Claude, ChatGPT, Codex or any agent) run Altium Designer for you: create symbols and footprints, place parts (also from Altium 365), wire and annotate schematics, Update PCB, set the stack-up and rules, route, pour copper, add mounting holes and stitching vias, run ERC and DRC, and make Gerbers, BOMs and STEP. Free in Hydrogen; bring your own AI and Altium licence.
build_schematic + build_board leave a second, invisible view of the PcbDoc: two board tabs after the project reopens, altium_state lists one
What I ran (bridge 0.2.47 dev build, Altium Designer 26.11.1, DESKTOP-BAR6S0F), as AI Flow's altium schematic step does:
altium_build_schematic {schPath, libraryPath, pcbLibPath, pcbPath, parts, nets}. This creates<Design>.PrjPcbwith the sheet, the libraries and the OutJob, and lists the.PcbDocbefore the file exists.altium_build_board {pcbPath, libraryPath, outline, ...}. This creates and saves the board.altium_save {filePath: board},altium_close_document {path: <project>},altium_open_project {projectPath}.
Expected: one board document in the project and one board tab.
What happened:
- Before step 3, the Projects panel listed the board twice, one entry greyed.
- After step 3, the tab strip showed two
SymTest.PcbDoctabs, one marked modified (*).altium_statelists only ONE PCB document, so the second is a view or free document that the agent's document list does not show. - Closing the project does not close it. Closing the project from a fresh Altium and running the steps again reproduces it.
Workaround (AI Flow 0.1.99, tools/altium-project.py): save the board and the sheet, altium_close_document each document by path (board, sheet, SchLib, PcbLib) and then the project, then reopen the project. That leaves exactly one board tab and one sheet tab.
Suggested fix:
build_boardshould open or create the PcbDoc inside the focused project whenbuild_schematicalready listed it, rather than as a free document.altium_stateshould list every open view, including free documents, so this is visible.