Fix parsing name of top level schematic lib symbols #112
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.
I had an issue with Kiutils parsing locally edited symbols with names ending with _NUMBER as symbol with unitId and styleId, example:
have symbol called
C_100n_0402
from some lib, modify symbol on the schematic. KiCad adds entry calledC_100n_0402_1
tolib_symbols
. This only occurs if there is multiple symbols/units from given library and one/more of them is modified on schematicHere is how changes looks like in the file.
initial schematic symbol s-expression
after editing
C_100n_0402
symbol on schematic:and symbol added to
lib_symbols
by KiCadAnd parsing this entry from
lib_symbols
results in following Symbol object:as the name matched regex in
libId
setter inSymbol
class and was parsed as name containing unitId and styleIdFor multi unit symbols case looks this same, _1/_2... is added to the name of the symbol and copy of it is stored in the
lib_symbols
section.Using KiCad 7.0.11
Example project with symbol affected with this:
issue_example.zip