Hi guys, do we currently have a way to set or place components using variables?
It could be by changing a property like do not place.
For instance, I would like to have a variable that sets if a pull-up or pull-down resistor is used. Alternatively, if a signal goes to VCC or GND.
Is it possible to do something like this or any alternative way of having a similar result?
There’s not a great formalized way to do this that I know of (using the official Do Not Populate property). However, you can use text variables and a custom “Assembly Notes” (or similar) column to make specific components be “place” or “do not place” when it goes to the assembly step. With a few 0-ohm resistors and dedicated text/sheet variables for each, you can certainly re-direct signals to VCC/GND.
I believe KiBot has something for variants, which might be useful for you? I’m afraid I’m not personally familiar with it though.
Not sure if i understand you correctly. But if i do, this is how we do that:
Every part in the schematic has a field
placed, this can be set to
never, or a coma separated list where every possible assembly is listed and if it is placed (and if it is which type / value). It is a bit more complicated in detail, but this reply is just to give you some idea.
When i am done, a script generates a BOMs for the project that includes the
placed information. A second program generates multiple BOMs based on this BOM so that every used assembly has its own BOM.
This requires a format rule for the placed field and a script (or compiled program) to generate the different BOMs.
My main idea was to use the Kicad Variables, to switch things on/off inside…
Thanks, @scandey, this was in my mind too. Considering Kibot… I just prefer to use simple/smaller standalone scripts, but I was already considering doing something similar.
The idea to do that in the BOM itself is okay and it requires the BOM script to be tuned. I was considering myself this option. But I just had to check here if someone could have a different trick. Thanks @scandey. I guess this is exactly what I am going to do.