Open EeEmDee opened 2 years ago
@EeEmDee this should work already - see here
However, the column name should be called Config
(not literally fit_field)
Hope this helps :)
@SchrodingersGat Oh, I forgot to mention. The .ini file I am using has fit_field = fit_field, not like in the default configuration with fit_field=Config.
Ah, ok. Can you test with the default "Config" field? It should work, independent of what the field (column) is actually called, but perhaps there's a bug there...
@SchrodingersGat In general all works as expected. I can create the correct BoMs for their respective variants and everything. I just want to create a BoM with all the parts, except where the fit_field (no matter its name) is 'dnp'. No matter the assigned variant. I hope you understand what I mean :)
Hi @EeEmDee ! Take a look at this file:
Try: KiBOM_CLI.py kibom-variante.xml pp.csv
You'll see only R1, R2 and R3 are included. Most of the excluded components uses Config=DNP
(tests various similar values DNF, Do Not Fit, etc.)
This example doesn't need a .ini file, uses the default Config
field.
Hi @set-soft, same problem.
I have attached a minimal working example. There is no config file attached, so kibom will execute with default settings.
When you execute python "KiBOM_CLI.py" "%I" "%O"
from within KiCAD it will generate a BoM with only R3 in it.
But what I want is R2,R3,R4,R5.
Hi @EeEmDee !
Ok, now I see what you want.
You want to disable the variants mechanism and only filter by DNP.
Here are some ways to do it:
fit_field = None
and use it.DNP
. Make it -1
for DNP components. Then define fit_field = DNP
. And generate variant 1
Hi @set-soft,
thanks for the response. The solutions seem reasonable, though for me they are not viable, because there is a certain infrastructure already built and if I would apply the changes as you proposed, then everything would go to hell lol.
I'm hoping that maybe the maintainer (@SchrodingersGat) could add the feature? Maybe as a setting in the config file. If not, then maybe I will fork the repo and code it myself.
Hi @EeEmDee !
If you are running KiCad on Linux, or you can use a CI/CD environment (like GitHub) you could try KiBot, it implements KiBoM variants and you can configure filters to do what you want.
Running it on Windows is tricky (you must setup a Linux like environment).
Hello there,
I want to generate a BOM where basically all parts are included, except those which are marked with 'dnp'. As an example lets say we have some parts defined as follows:
In my BOM I would like to get R2, R3, R4 and R5. Only R1 and R6 would be left out.
As of now I tried to play with the config file, but there is only the option to include all parts and the dnp parts or to exclude anything, that doesn't have an empty fit_field. I also wrote a script, where I had the idea to just use the -r option and put all available variants on the schematic in there, but then parts marked with a '-' would be also excluded. In the example above it would be R5.
What would be the a good way to get the desired behaviour?
Help would be appreciated :)