Load a project PcbDoc and extract its placed footprints back into PcbLib files.
This example shows both forms supported by the public API:
- a combined PcbLib containing one footprint definition per extracted component pattern
- split one-footprint PcbLib files that are convenient for DBLib-style library workflows
AltiumDesign.from_prjpcb(...)AltiumDesign.load_pcbdoc(...)AltiumPcbDoc.extract_pcblib(...)AltiumPcbLib.split(...)
From the repository root:
uv run python examples\pcbdoc_extract_pcblib\pcbdoc_extract_pcblib.pyThe script writes:
examples/pcbdoc_extract_pcblib/output/combined/RT_SUPER_C1_extracted.PcbLib
examples/pcbdoc_extract_pcblib/output/split/
examples/pcbdoc_extract_pcblib/output/pcblib_extraction_manifest.json