On This Page (8)
CLI: Fabrication & Manufacturing Outputs
These acr commands lower .PcbDoc, .PrjPcb, and .PcbLib designs through the shared FabView pipeline to generate manufacturing packages, baked mechanical documentation layers, assembly tables, and 3D Micro-STEP alignment models.
Commands At A Glance
| Command | Purpose | Primary Inputs |
|---|---|---|
acr fab | Write configured Gerber X2/X1, NC drill, and optional IPC-2581B from fab.jsonc (plus opt-in bake_to_pcbdoc) | .PrjPcb or .PcbDoc (or omit for CWD auto-detect) |
acr gerbz | Write Gerber and NC drill files only using fab.jsonc | .PrjPcb or .PcbDoc (or omit for CWD auto-detect) |
acr ipc2581 | Write IPC-2581B (.cvg) fabrication packages only using fab.jsonc | .PrjPcb or .PcbDoc (or omit for CWD auto-detect) |
acr vdoc (virtual-doc, virtual_doc) | Bake FabView virtual layers onto Altium mechanical layers (MECHANICAL35..51 defaults) using vdoc.jsonc | .PrjPcb, .PcbDoc, or .PcbLib |
acr bom | Generate normalized schematic or project BOMs (CSV, JSON, XLSX) using bom.config | .PrjPcb or .SchDoc |
acr pnp | Export Pick and Place placement tables (CSV, JSON, XLSX, CPL) using bom.config | .PrjPcb |
acr jlc | Generate JLCPCB BOM + CPL XLSX bundle with colorized missing-JLCPCB-Part-# table | .PrjPcb |
acr pcb-layer-step | Generate analytic, instanced 3D layer alignment STEP models via the pure-Python Micro-STEP AP242/AP214 engine | .PcbDoc or .PrjPcb |
ODB++ roadmap: ODB++ export is planned for a future release and is not included in this release. Both
FabViewandfab.jsoncare designed so ODB++ will plug directly into the sameacr fabworkflow alongside Gerber, NC drill, and IPC-2581B.
acr fab, acr gerbz, And acr ipc2581
All three commands share one hierarchical fab.jsonc schema (fab_config.a0), auto-discover sibling .PrjPcb files for project special strings and variants, and reuse a persistent 3D HLR cache when virtual assembly layers are enabled.
# Generate a starter fab.jsonc with documented defaults
acr fab --init-config --config fab.jsonc
# Run all enabled outputs (Gerber + NC drill + IPC-2581B when enabled in fab.jsonc)
acr fab project.PrjPcb --config fab.jsonc -o out/fab
# Run Gerber + NC drill only (ignoring outputs.ipc2581)
acr gerbz board.PcbDoc -o out/gerbers
# Run IPC-2581B only (ignoring gerber/drill)
acr ipc2581 board.PcbDoc -o out/ipc2581Key capabilities configured through fab.jsonc:
- Selective Gerber film toggles: toggle
keepout,profile,pad_masters,drill_guide,drill_drawing,virtual_layers.cutouts.on_profile, andmechanical_layers([],["used"],["altium"], or explicit selectors). - Dual-key custom extensions: remap any Gerber output extension using either canonical
FabViewkeys ("PROFILE","KEEPOUT","MECHANICAL8","CUTOUTS","PAD_LABELS_TOP") or Altium default extensions ("GTL","GTO","GM","GPLT"). - All 17 board-derived virtual layers & unified
"virtual_layers"config: configurecutouts,pin1(includingexclude_two_pin_prefixes: ["X", "Y"]so 2-pin crystals stay clean while 4-pin oscillators and explicitPIN1_PADstay marked),diodes,capacitors,inductors,resistors,assembly_outlines,assembly_designators, andpad_labels(.GPLT/.GPLBwithknockout,font_mode,skip_mechanical_pads, andinclude_through_hole). Every component-scoped family supportsvisibility_mode("all" | "explicit", or"all" | "polarized_only" | "explicit"forcapacitorsandinductors) and its own Altium boolean parameter (ASSEMBLY_OUTLINE,ASSEMBLY_DESIGNATOR,PIN1_MARKER,PAD_LABELS,DIODE_SYMBOL,CAPACITOR_SYMBOL,INDUCTOR_SYMBOL,RESISTOR_SYMBOL) under one uniformconfig > parameter > exclusions > visibility_modeprecedence (with DNP always winning). The exact same"virtual_layers"sub-struct is shared byfab.jsonc,vdoc.jsonc,pcb.svg.config,acr toon,acr dr, and MCO baking — with siblingfab.jsoncinherited read-only. Emits directly into Gerber X2 (OtherDrawing) and IPC-2581B (DOCUMENT/ASSEMBLYlayers outside<StackupGroup>). See Virtual Fab Layers. - Opt-in
bake_to_pcbdocsection: optionally bake configured virtual layers onto.PcbDocmechanical layers as part ofacr fab(enabled: falseby default; supportsbackup,clear_existing,set_layer_names,set_layer_pairs,designator_mode, andlayers). - IPC-2581B options: configure
merge_net_ties,edge_cutouts,document_layers,include_virtual_layers,virtual_layers,bom, andpopulate. - Fonts & diagnostics: configure TrueType font policy (
altiumorembedded_first,files,folders,standard_only) and inspect per-board reports (<board>.fab-report.json).
acr vdoc And vdoc.jsonc
acr vdoc (aliases virtual-doc, virtual_doc) computes FabView virtual layers and bakes them directly onto Altium mechanical layers of a .PcbDoc, .PrjPcb (all listed boards), or .PcbLib through the MCO engine (pcbdoc.bake_virtual_layers / pcblib.bake_virtual_layers).
Key behaviors & safety guards:
- Safe high mechanical defaults (
MECHANICAL35..51): Keeps baked virtual layers completely above Altium Designer's standardMECHANICAL1..32footprint library layers (3D bodies, courtyards, assembly, dimensions) while staying inside the authoredMECHANICAL1..53range. - Occupied-layer collision guard (
--force): Before clearing or baking any target mechanical layer,acr vdocrunsdetect_mechanical_layer_collisions. If any target layer holds 3Dcomponent_bodiesor non-virtual primitives,acr vdocprints a colorized collision table and refuses to overwrite until you remap the layer invdoc.jsoncor pass--force. - First-run auto-creation &
fab.jsoncinheritance: If novdoc.jsoncexists beside the input (and--dry-runis not set),acr vdocwrites a commented startervdoc.jsoncautomatically. Virtual-layer styling, visibility, and per-component overrides are inherited automatically from a siblingfab.jsoncwhenever present, and can be selectively overridden insidevdoc.jsonc's optional"virtual_layers"object. - Safe in-place
.bakbackup &--dry-run: Overwriting in place creates<input>.bakby default (customize with--backup-path, skip with--no-backup, or write a separate file with-o/--output). Use--dry-runto preview layer counts without writing files. - Clean removal (
--clear/--clear-only,--keep-layers): Passacr vdoc --clear(alias--clear-only) to remove previously baked virtual primitives and virtual User Unions from the layers configured invdoc.jsonc(or--layers/--map) without redrawing anything — and cleanly hide/unpair emptied virtual mechanical layers (MECHENABLED=FALSE,USEDBYPRIMS=FALSE, removed fromMECHPAIR*andLAYERSET*, defaultMechanical Nname) so they disappear from Altium Designer's layer list. Pass--keep-layerswith--clearto leave the layer names/pairs enabled. Enforces the exact same.bakbackup,--dry-run, and occupied-layer collision guard (--force).
# Generate a starter commented vdoc.jsonc template
acr vdoc --init-config --config vdoc.jsonc
# Preview baking on a project or board without writing files
acr vdoc project.PrjPcb --dry-run
# Bake in place (creates <board>.PcbDoc.bak first, blocks on occupied layers)
acr vdoc project.PrjPcb
# Write to a separate file and filter specific virtual layers
acr vdoc board.PcbDoc -o out/board_vdoc.PcbDoc --layers CUTOUTS,PIN1_TOP,PAD_LABELS_TOP
# Override layer mapping on the command line or force-clear an occupied layer
acr vdoc board.PcbDoc --map PAD_LABELS_TOP=MECHANICAL44 --force
# Remove previously baked virtual primitives, unions, and hide emptied layers
acr vdoc project.PrjPcb --clear --dry-run
acr vdoc project.PrjPcb --clear
acr vdoc project.PrjPcb --clear --keep-layers
# Bake outlines, Pin 1, and pad labels into a .PcbLib (all or selected footprints)
acr vdoc footprints.PcbLib --footprints QFN48,BGA64 -o out/footprints_vdoc.PcbLibAnnotated vdoc.jsonc Example
{
"schema": "vdoc_config.a0",
// Virtual layers to bake into .PcbDoc boards (safe defaults: MECHANICAL35..51).
"layers": {
"CUTOUTS": "MECHANICAL35",
"PIN1_TOP": "MECHANICAL36",
"PIN1_BOTTOM": "MECHANICAL37",
"DIODES_TOP": "MECHANICAL38",
"DIODES_BOTTOM": "MECHANICAL39",
"ASSEMBLY_OUTLINES_TOP": "MECHANICAL40",
"ASSEMBLY_OUTLINES_BOTTOM": "MECHANICAL41",
"ASSEMBLY_DESIGNATORS_TOP": "MECHANICAL42",
"ASSEMBLY_DESIGNATORS_BOTTOM": "MECHANICAL43",
// Optional layers (uncomment to bake):
// "PAD_LABELS_TOP": "MECHANICAL44",
// "PAD_LABELS_BOTTOM": "MECHANICAL45",
// "CAPACITORS_TOP": "MECHANICAL46",
// "CAPACITORS_BOTTOM": "MECHANICAL47",
// "INDUCTORS_TOP": "MECHANICAL48",
// "INDUCTORS_BOTTOM": "MECHANICAL49",
// "RESISTORS_TOP": "MECHANICAL50",
// "RESISTORS_BOTTOM": "MECHANICAL51"
},
// Virtual layers to bake when running `acr vdoc` on a .PcbLib.
"pcblib_layers": {
"ASSEMBLY_OUTLINES_TOP": "MECHANICAL40",
"PIN1_TOP": "MECHANICAL36",
"PAD_LABELS_TOP": "MECHANICAL44"
},
"backup": true, // Create <input>.bak before in-place save
"clear_existing": true, // Idempotently wipe prior virtual primitives/unions
"set_layer_names": true, // Name target layers (e.g. "Virtual Pin 1 Top")
"set_layer_pairs": true, // Pair top/bottom virtual mechanical layers
"designator_mode": "strokes", // "strokes" (M1..M53) or "native_text" (M1..M16)
"cutouts_union_name": "Virtual_Cutouts", // User Union grouping board-level CUTOUTS
"union_designators_with_component": true // Group free designators with their component
}acr pcb-layer-step And pcb-layer-step.jsonc
acr pcb-layer-step generates 3D CAD STEP alignment models (with per-body RGB colors and a companion JSON manifest) for mechanical enclosure checks, test fixtures, and mating-board alignment.
Powered by altium-cruncher's pure-Python Micro-STEP AP242/AP214 engine:
- Exact analytic curves: Circular pads, holes, annuli, rounded rectangles, obround capsules, and circular-arc tracks/outlines emit true analytic STEP
CIRCLE/CYLINDRICAL_SURFACEentities rather than faceted polygon approximations. - Assembly instancing: Repeated identical pad, via, and drill shapes share one geometric representation placed via STEP
NEXT_ASSEMBLY_USAGE_OCCURRENCEtransforms — keeping output STEP files compact and fast to open in CAD tools. - Fast 2D drill cutting & optional fusion: Performs 2D planar drill subtraction and optional region unioning before 2.5D extrusion — eliminating heavy 3D B-rep boolean bottlenecks and OCCT timeouts on dense multi-thousand-pad boards.
- Multi-output presets & test-point highlights: One
pcb-layer-step.jsoncfile can emit multiple layer STEP files (e.g.bottom,top,outline-only) with distinct feature colors, Z thickness bias (preventing Z-fighting), and designator-matched highlight rules (TP*,J*, etc.).
# Write a commented starter pcb-layer-step.jsonc template
acr pcb-layer-step --init-config --config pcb-layer-step.jsonc
# Export using sibling pcb-layer-step.jsonc (auto-creates template if absent)
acr pcb-layer-step board.PcbDoc -o out/step
# Override layer, drill mode, or emit board outline only
acr pcb-layer-step project.PrjPcb --doc board.PcbDoc --layer bottom --drill-hole-mode overlay
acr pcb-layer-step board.PcbDoc --outline-only -o out/outlineAnnotated pcb-layer-step.jsonc Example
{
"schema": "altium_cruncher.pcb_layer_step.config.a0",
"outputs": [
{
"name": "bottom",
"layer": "bottom",
"output_step": "{board}_{layer}.step",
"thickness_mm": 0.035,
"z_mm": 0.0,
"include_board_outline": true,
"board_outline": {
"width_mm": 0.2,
"color": "#FFFF00",
"cutouts": true,
"cutout_color": "#FFFF00"
},
"features": {
"component_pads": {
"mode": "matching_designators",
"include_designators": ["TP*", "M*"],
"color": "#B87333",
"thickness_bias_mm": 0.01,
"highlight_rules": [
// Highlight test-point pads in red as a dedicated STEP body
{ "designators": ["TP*"], "color": "red", "step_body_name": "test_points" }
]
},
"tracks": { "enabled": false, "color": "#B87333" },
"polygons": { "enabled": false, "color": "#7A8F2A", "thickness_bias_mm": 0.003 },
"vias": { "enabled": false, "color": "#C08540", "thickness_bias_mm": 0.006 }
},
"drills": {
"mode": "overlay", // "auto" | "cut" | "overlay" | "none"
"selected_component_mode": "cut", // 2D boolean hole cut on selected pads
"other_component_mode": "none",
"free_pad_mode": "overlay",
"minimum_diameter_mm": 0.85,
"shape": "ring", // "solid" | "ring"
"ring_width_mm": 0.12,
"plated_color": "#666666",
"non_plated_color": "#00AEEF"
},
"fuse_copper": false
}
]
}acr bom, acr pnp, acr jlc, And bom.config
acr bom, acr pnp, and acr jlc share one JSON/JSONC configuration schema (altium_cruncher.bom.config.a0, auto-discovered from ./bom.config or loaded explicitly via --config <path> such as --config bom-pnp.jsonc).
Updated BOM & JLCPCB defaults:
- Concise BOM output columns:
bom.output_fieldsdefaults to["quantity", "designators", "mfg", "mpn", "description"]grouped by["mfg", "mpn", "description"], outputting bothraw-jsonand formattedgrouped-xlsxworkbooks. - DNP placement at end:
bom.dnp_placementdefaults to"end"(withsplit_dnp: trueandhighlight_dnp_rows: true) so fitted production lines stay cleanly grouped at the top and Not-Fitted rows appear highlighted at the bottom. acr jlcmissing-JLCPCB-Part-# terminal check: When generating JLCPCB BOM + CPL XLSX bundles,acr jlcchecks every fitted grouped BOM line for a populatedjlcpcb_part_number(matchingJLCPCB Part #,JLC Part #,LCSC Part #,LCSC, etc.) and prints a colorized missing-parts terminal table (QTY,DESIGNATORS,VALUE,FOOTPRINT,MPN,MFG) plus a warning summary banner whenever any fitted line lacks an LCSC/JLCPCB part number.
# Write a starter BOM/PnP JSONC config template (default ./bom.config or custom path)
acr bom --write-config bom-pnp.jsonc
# Export grouped BOM (variants, XLSX/CSV/JSON, DNP lines placed at end)
acr bom project.PrjPcb --config bom-pnp.jsonc -o out/bom
# Export Pick and Place placements (mm/mils, position modes, variants)
acr pnp project.PrjPcb --config bom-pnp.jsonc -o out/pnp
# Export JLCPCB BOM + CPL XLSX bundle and inspect any missing LCSC part numbers
acr jlc project.PrjPcb --config bom-pnp.jsonc -o out/jlcUse acr bom --help, acr pnp --help, and acr jlc --help for variant selection (--variant, --all-variants), --position-mode, --exclude-no-bom, and output template options.
Related Guides
- Fab & FabView — Python API behind
acr fab,gerbz, andipc2581 - Virtual Fab Layers — all 17 virtual layers, pad labels, and mechanical-layer baking API
- Monkey Change Orders (MCO) —
pcbdoc.bake_virtual_layers,pcblib.bake_virtual_layers, andpcbdoc.export_layer_step - Gerber Contract — Gerber X2/X1 specification guarantees
- AOD Register — documented differences vs. Altium Designer