SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
350 stars 95 forks source link

board_variant with --cfg not building BOM's with joined variants #191

Closed myamigo closed 3 months ago

myamigo commented 7 months ago

From the command line we have the option of building BOM's that are based on multiple variant tags...

e.g. if we have a PCB with three components that have the following values in the fit_field field:

C1 -> "-production,+test" C2 -> "+production,+test" R1 -> "" R2 -> "-test" If the script is run with the flag --variant production then C2, R1 and R2 will be loaded.

If the script is run without the --variant production flag, then R1 and R2 will be loaded.

If the script is run with the flag --variant test, then C1, C2 and R1 will be loaded.

If the script is run with the flags --variant production,test, then C2 and R1 will be loaded.

If the script is run with the flags --variant production;test;production,test, then three separate BoMs will be generated one as though it had been run with --variant production, one for --variant test, and one for --variant production,test.

I believe it should be possible to set the default variant in the .ini file to include multiple variant tags as we can on the command line... _boardvariant = 'production,test'

... but this does not seem to work. I always get 2 files... one for 'production' and another for 'test'. I've tried various things to get this to work including putting the strings in a list but I always get individual results.

It would be nice to have the same functionality with a --cfg file.

SchrodingersGat commented 6 months ago

@myamigo currently the understanding of "variant" is that each variant is a separate, unique BOM. It is not possible in the current architecture to "combine" variants in this manner.