Replies: 6 comments
-
|
Take a look at the example: tests/yaml_samples/var_rename_footprint.kibot.yaml And other YAML files in the yaml_samples dir. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, so it doesn't work with this structure? In my opinion it should be "automatically" applied once I apply a variant. It would be more logical and also simpler. Am I missing something? Is there a reason why it's not done this way? |
Beta Was this translation helpful? Give feedback.
-
Nope,
Because then you can't disable it. The fact that some tools interprets fields named So this is just a filter, you can use it or not. You can customize it, and you can insert it in a chain of filters, and in the order you need. Built-in filters are there to make things easier. They are the most common versions of the filters, so you don't need to define them. But you need to apply them. |
Beta Was this translation helpful? Give feedback.
-
|
I see, it makes sense. Thank you for the explanation. Now it works, meaning that the value is correct, but since Kicad somehow added the fields S:MPN and S:LCSCPN to all the components (I don't know if this is the expected behavior), I have this, of course: EMXJ4S_simpleBOM.csv I had to delete manually the fields from every components in the schematic and in the PCB file. Now it works properly. It would be neat to have a fallback to the MPN field if S:MPN is empty. |
Beta Was this translation helpful? Give feedback.
-
|
But then: How do you explicitly empty a field using variants? I mean: how can KiBot know you are not trying to copy the empty value? |
Beta Was this translation helpful? Give feedback.
-
|
Honestly, I don't know for sure. However, that's just my case. In these few months/years using KiBot I learnt there are so many different usages that it's really hard to imagine all different cases. For example, someone could use those fields for something else than MPN, so it's not really straightforward. Some filter like "fallback_if_empty" would be ok for my case, but it's probably such a niche case that's not even worth to address. By the way, I use KiCad on 2 different PCs, and only one of them adds the fields on all components, so maybe there's a wrong setting on that PC. Once I investigate it this will probably not be an issue anymore. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to change some resistor/microcontroller value with different variants on the same project.
I have created these fields in the component (the variant is simply 'S'):
As per documentation (https://kibot.readthedocs.io/en/latest/configuration/filters/var_rename.html#variant-renamer), but I don't understand how to implement this filter/variant.
I expected these fields to work globally, once I defined them, but it's not working, as I'm surely missing something.
Here are the yaml files I'm using. If you need some more information let me know.
bom.kibot.yaml
position.kibot.yaml
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions