fix(KiCad API): 🐛 new categories excluded from simulation #1192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @jbtronics,
first of all - thank you for developing and maintaining this incredible piece of software. 🙏
When initially adding all my parts to
Part-DBwith the defaults provided, I just discovered that categories get created withexcluded_from_simset totrue. When also creating all parts with the default ofnull(which meansinheritfrom category) then all parts are per default excluded from simulation when adding them to KiCad via the API endpoint. This means that in older versions of KiCad (pre v9) newly placed parts are initially shown crossed outand in newer versions (v9 and newer) they get outlined and shown with an additional tag on the bottom right side
indicating that they are excluded from simulation.
This is rather annoying as changing this now requires manual adjustment of that setting for every single category in existence. This could only be made easier for existing users by providing some kind of batch editing feature which as far as I know is not a thing.
To at least mitigate this inconvenience for new users and new categories that existing users create, this PR proposes to set
excluded_from_simtonullfor new categories and default tofalsein the helper function if the property is not set.Best regards,
@lukas-runge