Variants

Assembly variants: named sets of changes to the parts of a project.

An assembly variant is a named set of changes to the parts of a project: parts not fitted (DNP), or fitted when the files say DNP, and different values, footprints or fields (an MPN, a supplier). Base is the KiCad files as they are; every other variant is stored in the .kicad_pro under softforge.variants, so KiCad opens the project unchanged and the variants travel with it in git.

Picking the active variant. The variant picker in the status strip (both editors) and in Appearance ▸ Layers lists Base and the variants. The active variant is drawn on the canvas: DNP symbols are crossed out, DNP footprints are hatched (the DNP markers layer; Dim DNP parts fades them and is kept between sessions), value overrides show their new value, the 3D view hides the DNP models and the ratsnest leaves the DNP pads out. The live DRC does not ask for connections to the variant’s DNP parts. The Properties panel shows “In Lite: DNP” or “value 1k (override)” for the selected parts. Switching is one undo step.

One project, every editor. The schematic and board editors of a project share one copy of the .kicad_pro: a variant edited (or activated) in the schematic editor shows in the board editor at once, and the same holds for net classes, rules and DRC exclusions. Saving any editor writes the project once; undo in one editor takes back only its own edit (later edits made in the other editor stay); Revert and a .kicad_pro changed on disk (edsnx variant …) reach every editor. Closing an editor without saving takes back its unsaved project edits.

The Variants dialog (Manage variants… in the picker, or Electronics Designer: Variants…) is a matrix of components × variants. Each cell shows fitted, DNP or an override; click, Ctrl+click, Shift+click or a column header selects cells, then Fitted, DNP, Value…, Footprint… or Clear apply to all of them. The filter box (reference, value, footprint) and the DNP and Overrides chips narrow the rows. The toolbar adds, renames, duplicates and deletes variants; Import CSV (ref, variant, fitted, value, footprint) and Export CSV exchange the matrix with a spreadsheet; BOM exports the bill of materials of the current variant. Apply writes the .kicad_pro (one undo step).

Outputs per variant. Fabrication outputs, position files, plots, 3D exports and the BOM take a variant: the board is baked into a temporary copy, so the position file leaves the variant’s DNP parts out, the 3D export hides them and plots mark them. A documentation BOM table or assembly view can name a variant (its parts are fitted or DNP as the variant says; assembly views hide the DNP parts). Auto-balloon on a view with a variant leaves out the parts that variant does not fit, and an existing balloon pointing at such a part is struck through. Write to files (variant.bake) writes a variant’s DNP flags (and with values its value, footprint and field overrides) into the schematics and the board so that KiCad itself shows it; the Base state is recorded and Restore Base writes it back. A sheet used several times (two Timer instances: R1 and R101) can be fitted in one instance and not the other. Such a symbol has one DNP flag for all its instances, so Write to files leaves the flag at Base and writes the variant into each instance instead, as KiCad 10 per-instance variant data named like the variant ((path "/…" (reference "R1") (unit 1) (variant (name "Lite") (dnp yes))), with value and field overrides under values): KiCad shows it when that variant is selected, and kicad-cli sch export bom --variant Lite (or netlist) honours it. Restore Base removes it again. Inside the editors, the BOM, position files and documentation the overrides are per reference, so per instance already.

Footprint overrides in Update PCB. With a variant active, Update PCB (and the live parity check, edsnx project update-pcb) uses the variant’s footprint overrides: a part overridden from R_0805 to R_0603 is swapped on the board like any changed footprint. Activating Base and running Update PCB again brings the Base footprints back.

From the command line:

text
edsnx variant add blinky.kicad_pro --name Lite --description "No programming header"
edsnx variant set blinky.kicad_pro --id lite --refs J2,D1 --fitted false
edsnx variant set blinky.kicad_pro --id lite --ref R3 --value 1k
edsnx variant activate blinky.kicad_pro --id lite
edsnx variant export-bom blinky.kicad_pro --out fab/blinky-lite-bom.csv
edsnx project fabricate blinky.kicad_pcb --variant lite

variant.list, variant.remove and variant.bake complete the set. When the board is open in an editor (or an attached session), the variant.* commands edit the project its editors share (undoable, written when the board is saved); otherwise they write the .kicad_pro.

Limits: footprint overrides reach the board through Update PCB (or Write to files with values), not live, and the live parity check notices a changed active variant once the schematic changes. A per-instance difference in “exclude from BOM” is not written into the files (DNP, values and fields are). The variants are not yet written as KiCad’s own design variants for parts that every instance treats alike (those get the symbol’s flags).

Documentation for Electronics Designer 2.3.60.