lib_move_bodies_to_layer
Move all or selected PCB footprint 3D bodies to one mechanical layer so mixed-source libraries display consistently, without adding or removing bodies.
Instructions
Put the 3D bodies of the focused PCB library on one mechanical layer.
Libraries put together from several sources carry their bodies on whatever layer each source used, so one footprint's model shows with a layer turned on and the next one's never does. Every footprint, or only the named ones, has each body moved; a body already on the layer is counted and left alone. Nothing is added or removed.
Args:
layer: The mechanical layer, by number ("Mechanical13") or by
the name the library's stack gives it. Anything else is
refused, as Altium's body dialog only offers mechanical
layers.
footprint_names: Only these footprints. Empty means every
footprint in the library; names no footprint has come
back in not_found.
Does NOT save the library. A mechanical layer the library has not
enabled is accepted, with layer_enabled false and a
warning, since Altium does not draw what is on it.
Returns:
Dict with layer, layer_enabled, footprints,
bodies, moved,
already_on_layer, footprints_without_bodies,
not_found, and items ({name, moved, from} for
each footprint that changed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | Yes | ||
| footprint_names | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||