lib_get_footprint_primitives
Read all non-pad primitives of a PcbLib footprint—tracks, arcs, regions, fills, texts, and vias—with layers and mm coordinates from the footprint origin; pads are handled separately.
Instructions
Every non-pad primitive of one PcbLib footprint, with where it is.
Tracks, arcs, regions, fills, texts and vias, each with its layer
(the name the library's stack gives it, plus layer_id), in mm
from the footprint's origin: the frame the lib_add_footprint_*
writers take. Pads are in lib_get_pad_geometry. Read-only.
Each primitive is listed once. Altium's own iterator yields one
just added to the footprint on screen twice until that footprint
is shown again; the footprint writers here show it again after
each write, and this read skips a repeat either way.
Args: footprint_name: The footprint name in the library. library_path: Optional .PcbLib path; defaults to the focused library.
Returns: {name, library_path, height_mm, bodies (a count), body_layers (the layer of each body), tracks [{layer, layer_id, x1, y1, x2, y2, width}], arcs [{layer, layer_id, xc, yc, r, start, end, width}], regions and fills [{layer, layer_id, x1, y1, x2, y2, area (regions)}], texts [{text, layer, layer_id, x, y, size, rotation, x1, y1, x2, y2}], vias [{x, y, diameter, hole}]}. A text's box is Altium's cached one and can lag an edit made this session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| library_path | No | ||
| footprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||