Footprint change in python

Hi,

is there a way to change the component’s footprint using the python scripting console in pcbnew? I could not find find any funtion to do that in the pcbnew documentation. I do not need the footprint to be changed also in the schematics etc, I just need to change the ‘image’ of the component.

Thank you for your help

You can delete old footprint and add new one to the board. You will have to reassign nets to pads and set reference as well if you want it to “replace” old one.

Thanks, only thing I want to do is to temporarilly change the footprints ‘image’.

The main goal is to plot a SVG layer with only ‘SMD’ components and then with only ‘THT’ components. I could not find any way to select components to be plotted though, so my idea is to change some components’ footprints to for example emty ones, plot the layer and then chage them back. Is there a way to do that or maybe some another/better approach?

Why not use python to extract only smd footprints and plot just these instead of changing the file and then use the normal plot option? This would be the better implementation of such a feature to be honest.

I agree, but I am relatively new to the kicad scripting and I could not find a way how to plot a .svg from a layer with only some components selected. Could you point me how to do that?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.