lib_update_footprint_heights_from_3d
Populate footprint heights from 3D models to enable placement-collision DRC height checks and avoid vendor libraries defaulting to zero-height footprints.
Instructions
Sweep the active PCB Library: for every footprint, find the
tallest 3D body and write its OverallHeight to
Footprint.Height.
Footprint.Height is what Altium's placement-collision DRC uses to enforce height-clearance rules (don't place a tall electrolytic under a low overhang; don't sandwich an LCD connector under another PCB in a multi-board stack-up). Libraries shipped from vendors without explicit heights default to 0 which makes the DRC silently no-op -- a real production risk caught only at first-article assembly.
Args:
mode: raise (default) only ever increases a height, so a
hand-set "I know this part is 5mm despite the model
being 3mm" survives. match also LOWERS one to the
model.
Reach for match when heights are too TALL, which raising
cannot fix and which is the more damaging fault: a footprint
claiming 50mm when the part is 3mm fails placement-collision
DRC against everything near it and blocks placements that are
fine, where a too-low height merely fails to catch a real
collision. To correct one footprint, or one with no model at
all, use lib_set_footprint_height.
Safety:
NEITHER MODE WRITES ZERO. A footprint with no 3D body yields no measurement, and writing the 0 that implies would silently disable the very DRC rule this arms. Those come back as
without_modelwith their names.Does NOT save the library; review the
items[]diff and save in Altium.
Returns:
Dict with mode, inspected, updated, lowered,
without_model, without_model_names, and items
({name, old_height_mm, new_height_mm} per footprint).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | raise |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||