lib_auto_link_3d_models
Batch-link STEP 3D models to PCB footprints by matching filenames in a specified model directory, returning linked pairs and unmatched footprints or unused models.
Instructions
Batch-link STEP models to footprints by matching file names.
Enumerates every footprint in the PcbLib, scans model_dir for
.step/.stp files, and links each footprint whose name matches a model
file's stem (case-insensitive). Builds on lib_link_3d_model so the
same caveat applies: offsets/rotations are not set, adjust in the
library if a model needs repositioning.
Args: model_dir: Folder containing .step/.stp model files. library_path: Optional .PcbLib to focus first; uses the focused document otherwise.
Returns: {"linked": [{footprint, model}], "unmatched_footprints": [...], "unused_models": [...]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_dir | Yes | ||
| library_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||