hildogjr / KiCost

Build cost spreadsheet for a KiCad project.
MIT License
493 stars 97 forks source link

Update eda_kicad.py to check for the property "dnp" for components #550

Open FelixGuilbertSavary opened 8 months ago

FelixGuilbertSavary commented 8 months ago

In the function extract_fields, added a loop to check for the property "dnp" in components.

In KiCad 7.0, eeshema has an attribute "Do not populate" when editing a component properties. When enabled, the component will appear with an X overlaid on the component. However, this gets added as a property in the .xml generated by kicad, not a field.

Tested on an in-house schematic. Did not manage to run the tests with tox due to missing Python interpreters.

set-soft commented 8 months ago

It should have an option to make it optional.

I didn't take a look, but the important flag is the one that says the component must be excluded from the BoM. This one isn't the correct flag. The fact that a component isn't soldered doesn't necessarily mean you want to exclude it from the BoM. Yes, I know is common practice, but KiCad has a separated flag to mark this.