-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Set new DNP field based on configured variant #188
Comments
@myamigo I feel that this idea is somewhat out of scope for the project, but if you come up with a way of implementing this seamlessly, let me know! |
Hi @myamigo ! |
Hi @SchrodingersGat !
Lamentably the Python schematic API (in the roadmap for 6.0) was never implemented, so you must deal with the schematic format, which isn't well documented. KiBot can read and write schematic for KiCad 5, 6 and 7 (even for 7.99). So it can load a schematic, apply the variants to the DNP attribute and store it to disk. Is really complex. |
Hi @SchrodingersGat, I will share whatever I come up with. I was hoping to learn how to set a field in a symbol and since your script touches every component I figured the simplest approach would involve modifying your scripts. If you are able to suggest a command that would allow me to set a field in the symbol rather than just reading then I'll work with that. Otherwise it seems I'll have to complete a deep dive into KC Python scripting. Thanks for the KiBot suggestion @set-soft. I had looked at this previously but I am on Windoze and while I have WSL installed I am not quite prepared to commit to the effort required to get fully setup in that environment., Thank you both. |
Thank for this script. It's very useful!
I'm wondering if the following could work as a way to better leverage support for the new DNP field in symbols.
Rather than including the new DNP field as an input to your script as it does now with the new code added to isFitted(() could you instead set that field based on the DNP status as determined by the other tests in the same function (under # Variants logic). With this change when isFitted() exits the component's DNP flag will be explicitly set or cleared based on the variant field settings +BLAH, -BLAH.
After running the script for a particular variant the schematic would then visually display the DNP status for every component in the design.
I tried to figure out where and how to hack some changes in to test this but I got stuck not knowing how to set a field attribute.
Thank again!
The text was updated successfully, but these errors were encountered: