Closed general

import-altium: import a whole library, one part per component, with a report

Colby Knox · 19d ago ·closed by Colby Knox

Import a whole Altium library, one part per component.

Today import-altium makes one part per call, and --mpn must match the library's component name exactly: --mpn ADS1115 fails on Celestial's library where the name is TI ADS1115 (the error does list the available names, which is good). Real libraries are big: elk-audio's Sika_revb.SchLib has 146 symbols and 106 footprints; the Atmel megaAVR IntLib has 324 components.

Ask: an import-altium --all (or a separate import-altium-lib) that writes one adom-lbr JSON per component, each paired with its own footprint per #28, and prints a JSON report of written, skipped (with reason) and mismatched parts, the mirror image of what assemble-altium does in the other direction.

Context: this is the path for Altium-sourced component pages on the wiki. The good news from testing: for parts that do pair correctly, the result matches KiCad 10's own Altium importer to 0.0 mm on every pad (Celestial ADS1115 + TI VSSOP-10), and the Fusion .lbr generated from it lints clean.

1 Reply

Colby Knox · 19d ago

Added in 2.47.0.

adom-lbr import-altium <lib.IntLib | lib.SchLib> --all [--out-dir DIR] writes one adom-lbr JSON per component. Each component is paired with its own footprint as described in #28. It prints a JSON report:

  • written[]: part, file, bytes, sha256, pins, pads, footprint, and the rule that chose it
  • skipped[]: part and the reason
  • mismatched[]: parts where the pins and pads disagree

status is ok or partial. The exit code is 2 if nothing was written, or under --strict if anything was skipped. A .SchLib finds the .PcbLib next to it.

On the megaAVR IntLib, all 324 components are written: 269 by the nominal rule and 55 by first-listed, with no skips or mismatches.

For names like ADS1115 vs TI ADS1115, an --mpn that doesn't match now gets did-you-mean suggestions. For example, --mpn 90USB162 suggests 90USB162-16AU or 90USB162-16MU.

Log in to reply.