Use and build exporter plugins#

An exporter plugin is a Python package that adds a command to jitx design export. Install it in the environment that runs your design. When you invoke the command, JITX submits the design to the project runtime, captures the layout, and passes the captured design to the plugin. The plugin writes the files.

Export your first Gerber ZIP#

Start in a working JITX project with its Python environment active. The commands below use the myboard.main.Myboard design from Manual CLI setup and JITX 4.6.

  1. Install the Gerber exporter and look up its command and options.

    python -m pip install jitxlib-gerber
    jitx design export --help
    jitx design export gerber --help
    

    The distribution is named jitxlib-gerber. Its CLI name is gerber. If the command is missing, run python -m pip show jitx jitxlib-gerber in the same terminal. Check that both package locations are in the active project environment and that its bin directory (Windows: Scripts) supplies the jitx executable.

  2. Find your design and check the runtime from the project directory.

    jitx design find
    jitx runtime status
    

    If the project runtime is stopped, run jitx runtime start --background. Use the fully qualified design name returned by find in place of myboard.main.Myboard below.

  3. Export to a new ZIP and list its contents.

    jitx design export gerber myboard.main.Myboard --output board-gerbers.zip
    python -m zipfile -l board-gerbers.zip
    

    The .zip suffix requests an archive. On the sample board, the .gbrjob manifest describes the job, files ending in cu_l1_top.gbr and cu_l2_bot.gbr contain top and bottom copper, and profile.gbr identifies the board outline. The files you get depend on your design. Open the layers together in a Gerber viewer to inspect placement and routing.

Choose an exporter#

Python package

Export command

Output

Install source

jitxlib-gerber

gerber

Gerber fabrication files in a directory or ZIP

PyPI

jitxlib-odb

odb

ODB++ job directory, plus a .tgz with --tgz

PyPI

jitxlib-jlcpcb

jlcpcb

Manufacturing and assembly packet for JLCPCB

PyPI

jitxlib-step

step

3D board model in STEP format

JITX package index

jitxlib-mechanical

dxf

2D mechanical drawing in DXF format

JITX package index

jitxlib-ansys

hfss

Ansys EDB and AEDT project files

Wheel supplied by JITX

jitxlib-xpedition

xpedition

Siemens Xpedition project with schematic, layout, and Central Library

Private distribution through JITX

For ODB++, for example, install python -m pip install jitxlib-odb and run jitx design export odb --help. For a package on the JITX index, add the index to the install command:

python -m pip install --extra-index-url https://pypi.jitx.com/jitx/main/+simple jitxlib-step
jitx design export step myboard.main.Myboard --output board.step

For HFSS, install the supplied wheel with python -m pip install <path-to-wheel> on a host with a compatible AEDT installation and HFSS license. Use --no-simulate to generate the project without starting a solve. See Prepare the solver host. For Xpedition, obtain the private package from JITX and use its installation instructions on a Windows host with Python 3.13 or later, Xpedition, and the appropriate Automation licenses. Check jitx design export xpedition --help in that environment.

Generate a JLCPCB order packet#

The jlcpcb command uses the Gerber writer with JLCPCB filenames and NC drill settings. It adds the data needed for the order. Installing this package also supplies a JLCPCB parts policy for projects without an explicit parts chain.

python -m pip install jitxlib-jlcpcb
jitx design export jlcpcb myboard.main.Myboard --output assembly
jitx design export jlcpcb myboard.main.Myboard --no-assembly --output bare

The assembly run writes four files in assembly/. The bare-board run writes the first two in bare/.

Filename ending

Use

-gerber.zip

Upload the fabrication layers and drill data together.

-order.md

Read the board dimensions, layer count, thickness, and placement notes.

-bom.csv

Match the bill of materials to orderable parts.

-cpl.csv

Check the component placement list, including side and rotation.

Use a placed, routed design for a manufacturing handoff. The scaffold resistors have no LCSC part number. Their BOM rows require manual matching.

Build a board-summary exporter#

Download the board-summary example. The ZIP contains the Python module, packaging metadata, and live measurement fixtures. Save the ZIP in your project directory and run:

python -m zipfile -e board-summary.zip .
python -m pip install -e ./board-summary
jitx design export board-summary --help
jitx design export board-summary myboard.main.Myboard --output board-summary.json
python -m json.tool board-summary.json

An editable installation lets you change the module and rerun the CLI. In pyproject.toml, the entry point tells JITX which module to import during plugin discovery:

[project.entry-points.jitx-plugin]
export = "board_summary"

In board_summary.py, @Export.register("board-summary") gives the command its name. The export method receives a captured RuntimeDesign. Its keyword-only output: Path parameter becomes the --output option.

@Export.register("board-summary")
class BoardSummary(Export):
    """Write board dimensions, connectivity, and per-layer copper coverage to JSON."""

    def export(
        self, design: "RuntimeDesign", *, output: Path = Path("board-summary.json")
    ) -> None:
        """Measure the board after runtime capture.

        Args:
            design: Captured design supplied by the CLI.
            output: JSON file in an existing directory.
        """
        board = _Board(design)
        board.collect()
        report = json.dumps(board.report(), indent=2, allow_nan=False)
        output.write_text(report + "\n", encoding="utf-8")

Follow _Board.collect() to see how the writer gets its inputs. A design.query result pairs an object with its path and transform. For a pour, the example transforms its shape into board coordinates, resolves its conductor with design.layers.apply, and looks up its connected net with design.nets.find. It collects the geometry before calculating areas so that overlapping shapes and drills can be handled together.

To adapt the example, choose a new distribution name and command name, keep the entry point pointing at your module, and replace the measurement and JSON writer with your own. The released DXF plugin shows the same registration pattern with a separate writer and an output path check before submission.

Read the measurements#

All dimensions use mm and all areas use mm². Conductor indices start at zero on the top layer.

JSON field

How to read it

board

X and Y extents of the board profile, area inside it, and conductor count. The area follows concavities and internal openings, including all islands left by a cutout. JITX 4.6 accepts a single connected input outline. Round drills and routed slots are accounted for on the affected conductors.

components

Total instances and counts by top, bottom, and unplaced. A component’s side includes its parent circuit’s placement.

vias

Total placed instances, grouped by via definition, drilling method, and connected layer span. A blind span reaches one outer conductor, a through span reaches both, and a buried span reaches neither. Search the design or substrate for the reported definition. Captured stitch and fence placements are counted through the same via query.

net_count

Number of distinct runtime nets. Connected aliases count once. Unnamed nets count individually.

layers

Finished planar copper area and percentage of the common board profile area for each conductor. An empty conductor has zero coverage.

pours

One row per captured pour, including its design path, layer, net status and name, and individual finished fill area. Islands and clearances are reflected in each measurement.

non_via_holes

Plated and unplated totals split into round holes and open routed slots. A pad cutout is classified as plated when the pad has copper on at least one conductor. Copper-free pad holes and standalone mechanical holes are unplated. Via drills and backdrills are excluded from these hole counts.

For copper coverage, the example transforms every item into board coordinates and unions copper on each layer. Pads, via lands, traces, and pours can overlap, so adding their individual areas would count some copper twice. It clips the union to the profile and subtracts the drill and slot openings that reach that conductor, including backdrills. The percentage is 100 × finished copper area / board profile area. This is a plan-view measurement of modeled geometry. It uses the nominal pad stack, including backdrill entry lands. Drill dimensions come from the design, and curved boundaries are approximated by line segments. The report rounds at the end.

For an example with pours, use the installed check_board_summary module. Its fixtures use jitxlib-standard, included in the manual setup project. Run from the project directory:

python -m unittest check_board_summary
jitx design export board-summary check_board_summary.LayerDesign --output layer-summary.json

The four-layer fixture gives this excerpt from the two entries in pours.items:

[
  {"path": "circuit.left", "layer": 0, "net": "GND", "net_status": "named", "area_mm2": 42.772457},
  {"path": "circuit.right", "layer": 0, "net": "GND", "net_status": "named", "area_mm2": 47.987428}
]

Both pours start as 8 × 6 mm rectangles on GND. Find left in the fixture’s Populated circuit to see the foreign-net copper inside its boundary. The clearance around that copper reduces its realized fill. The two pours keep separate rows even though they share a net and conductor.

The two-layer fixture checks the coverage calculation independently. On a 20 × 10 mm board, two 50 mm² copper rectangles overlap by 10 mm². A 2 mm diameter hole passes through their union. The finished top-layer area is 90 − π mm², or 43.43% of the 200 mm² board. The bottom conductor is empty.

Use an Altium writer or a live Altium session#

A custom plugin can use a third-party tool for its output. For example, take one straight routed trace in the captured layout. Transform its endpoints into board coordinates, resolve its physical conductor and net, and carry its width. Map the conductor to the target Altium layer and the net to a target net object. Choose the target origin and axis directions explicitly.

  • Write native files with altium-monkey. Create an AltiumPcbDoc, convert millimeters to mils (mm / 0.0254), and use add_track with the two endpoints, width, layer, and net. Save the .PcbDoc and reference it from a .PrjPcb. A complete project also needs board geometry, stackup, footprints, pad-to-pin mappings, schematic symbols, sheets, and connectivity. altium-monkey

  • Drive Altium Designer with eda-agent. Supply the extracted trace data to an MCP client connected to the tool’s DelphiScript bridge on a Windows Altium host. Have the client select the intended PCB document, create the track with the bridge’s coordinate units, read back its endpoints, layer, width, and net, then save the document. eda-agent

Both approaches require a JITX-to-Altium adapter that implements these mappings. To check one, reopen the saved project in Altium and compare known dimensions, conductor assignments, and pin-to-net connections with the JITX design.