lib_add_footprint_tracks
Batch-add many tracks to an EasyEDA Pro footprint in one call, avoiding repeated single-track loops when drawing silkscreen or assembly outlines.
Instructions
Add MANY tracks to the current footprint in ONE call.
PREFER THIS over looping lib_add_footprint_track. A silkscreen
outline + assembly outline is 8+ segments; built one at a time
that's 8+ LLM turns and 8+ PreProcess/PostProcess+save cycles.
Batched it's one turn, one PreProcess/PostProcess, one save.
Args: tracks: List of track dicts, each with: - x1, y1, x2, y2 (int, mils) -- endpoints - width (int, mils, default 10) - layer (str, default "TopOverlay" silkscreen). Any Altium layer name, e.g. "BottomOverlay" or "Mechanical1".."Mechanical16" for courtyard/assembly.
Example, a 100x60 mil silkscreen rectangle in one call: lib_add_footprint_tracks(tracks=[ {"x1": -50, "y1": -30, "x2": 50, "y2": -30}, {"x1": 50, "y1": -30, "x2": 50, "y2": 30}, {"x1": 50, "y1": 30, "x2": -50, "y2": 30}, {"x1": -50, "y1": 30, "x2": -50, "y2": -30}, ])
footprint_name picks the footprint to write into. Empty uses
the editor's current footprint; a name makes that footprint
current first and refuses if it cannot, since otherwise the
primitives land in whichever footprint another call left current.
units is "mil" (default) or "mm" for every track in the
call, kept exact rather than rounded to whole mils.
Returns: Dict with added, failed, total counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | mil | |
| tracks | Yes | ||
| footprint_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||