altium monkey v2026.11.26 · gobblerito
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

CommandPurposePrimary Inputs
acr fabWrite 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 gerbzWrite Gerber and NC drill files only using fab.jsonc.PrjPcb or .PcbDoc (or omit for CWD auto-detect)
acr ipc2581Write 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 bomGenerate normalized schematic or project BOMs (CSV, JSON, XLSX) using bom.config.PrjPcb or .SchDoc
acr pnpExport Pick and Place placement tables (CSV, JSON, XLSX, CPL) using bom.config.PrjPcb
acr jlcGenerate JLCPCB BOM + CPL XLSX bundle with colorized missing-JLCPCB-Part-# table.PrjPcb
acr pcb-layer-stepGenerate 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 FabView and fab.jsonc are designed so ODB++ will plug directly into the same acr fab workflow 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.

powershell
# 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/ipc2581

Key capabilities configured through fab.jsonc:

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:

powershell
# 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.PcbLib

Annotated vdoc.jsonc Example

jsonc
{
  "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:

powershell
# 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/outline

Annotated pcb-layer-step.jsonc Example

jsonc
{
  "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:

powershell
# 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/jlc

Use 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.

altium-monkey v2026.11.26 · gobblerito·Docs updated 2026.11.29 17:55 UTC (0665053)