kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #32247
Re: Symbol library table remapping question
On 12/6/2017 3:11 PM, Bernhard Stegmaier wrote:
> Hi Wayne,
>
> Well, just think of me as a dumb user… :)
> First time that I updated to a version with sym-lib-table support (fresh from git some hours ago).
> And yes, I read the blog post.
> Maybe I didn’t understand it… might be another story… :)
>
> I decided to create a global sym-lib-table with all my libraries, just like for fp-lib-table.
> Then, I created a new project and played around a bit.
> Everything fine.
>
> Then, I decided to update an old project.
> Went through the remapping dialog, schematic looked to be fine afterwards.
> No missing symbols or bad things like that.
>
> Then I saw that a project specific sym-lib-table has been created with a “1” added to the end of (almost) all libraries used in that schematic.
> E.g., I now have “Devices” in my global table and “Devices1” in the local table.
> The symbols have been remapped to e.g. “Devices1:Resistor”.
>
> Is this really as expected?
This all depends on the symbol library list and symbol library path
configuration of the project being remapped. Here is how the remapping
works:
Attempt to find the symbol in a library from the project library list.
This is the list of symbol libraries stored in the project file found
using the project and default lookup paths.
If the symbol is found in any library but the cache, reconstruct the
full path to the symbol library.
Search the global footprint library table for an entry matching the full
path.
If an entry in the global symbol library table matches this patch, remap
the symbol to the library nickname.
If the entry is not found in the global symbol library table, create a
new project specific symbol library table entry with a unique library
nickname. This is why you see the number appended to the original
library file name.
Once all of the symbols are remapped, save the project library table if
any entries were added to the table.
There a several reasons why this could happen depending your environment
variables, global system library table configuration, project symbol
library list, and any symbol library lookup paths added to the project.
> The blog post states that “During the remapping process, symbol libraries not found in the global symbol library table will be used to create a project specific symbol library table.”
> I would have expected that symbols get remapped to the global table, i.e. to “Devices:Resistor”.
> Note, that I didn’t change any library (file)name.
> Maybe I chose another nickname here and there, but it obviously also didn’t work with libraries with same nickname (like Devices).
>
> If it is as expected, how would I go on with the project?
> Keep the local table?
> Looks pretty bad, because I also have duplicate entries in the component selector then (e.g., a “Devices” and “Devices1”).
Is the full path and file name for Devices in the global symbol library
table the same as Devices1 in the project symbol library table? If not,
then it's your configuration and the remapping is correct. If the paths
are the same, then there is a bug in the remapping algorithm that I
missed. If it's the latter, please file a bug report so I can fix it.
>
> If not, rewrite everything by hand to use the global table?
> I wouldn’t have needed the remapping at all then… ?
Everything has to be remapped. All symbol library links are required to
be fully qualified (LIB_NICKNAME:SYMBOL_NAME) in the schematic. It will
fall back to the cache but you should *not* depend this unless you like
living dangerously. If you don't believe me, delete the cache library
and don't remap your project. Every symbol will be the lovely square
with two question marks indicating a missing symbol.
>
>
> Another thing:
> The remapping dialog has a “Cancel” button.
> In my opinion it doesn’t cancel anything, it just closes the window - especially if you already had hit the “Remap Symbols” button.
> Users might be confused by this.
> Wouldn’t a “Close” make more sense?
> But, that’s something that is like that in more places with an “Apply” button, e.g. the “Update PCB from Schematic” dialog in pcbnew.
>
>
> Regards,
> Bernhard
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References