Update/Reload fields from library in Eeschema

Asked by Stefan Olsson

Dear Sir or Madame

Platform: Windows 7 64 bit
KiCad version: "after 2015-may-25 BZR unknown)-product release

Is there a way of updating the fileds for a component in EeSchema (back filling)?

I created a library with custom components
I have added all my components to my schema
I have routed my pcb
Everything was finished

However

I started to add fields Supplier1, Supplier2 and supplier3 fileds to my components in my custom library so these values
can then be retrieved when doing a BOM.

But the new fields is not seen in the components I have alreayd added to my schema.
Is there a way of "reloading/back-filling" the fields from the library in the schema without first remove and the nadd the components in the eschema?

There is this button "Reset to Library defaults" in the editor window for a component in Eeschema but it seems to do nothing.

I notice in the .sch files that the components are actually coped from the library to the .sch file which means that they have "lost" the relations ship between the components and wich library it came from so perhaps the only way is to bring up the library and the .sch files in two text editors and then manually copy the values.

PS
if this is not possible today (that is, easy to back fill fields) , perhaps it could, in the future, be good to add a button in the editor window for a component in Eeschema wich "reload/uodate" the fields.

Question information

Language:
English Edit question
Status:
Answered
For:
KiCad Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Wayne Stambaugh (stambaughw) said :
#1

Have you looked at section "4.2.2. Template fields names" in the KiCad documentation? Schematic components fields are not the same as library component fields even though they are closely related. The schematic field information is stored as part of the schematic and are created from the symbol when it is added to the schematic. Optional fields can also be added to the symbol libraries if that is your preference. However, KiCad symbol libraries are general purpose by design rather than fully qualified so it is up to the user to decide how to handle optional fields.

Revision history for this message
Stefan Olsson (stefan-olsson) said :
#2

I know that the item is copied from the library to the schematic when a Component is added to a schematic but I also know that if you change stuff in the library for a Component, such as the pins, this information is updated in the schematic automatically when you go back to the schematic from the library editor (and do a fake add), however the fields are not auto copied (wich i was hoping for).

The thing is that if you add fields to a Components in the schematic these changes will "only live" in that schematic. I have to add the update to both my schematic and my library if I want the new information to also be included in further projects based on my library.

But i guess at this point there is no other way than add the fields manualy to both the schematic and library.

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#3

On 6/15/2015 1:31 AM, Stefan Olsson wrote:
> Question #268059 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/268059
>
> Stefan Olsson posted a new comment:
> I know that the item is copied from the library to the schematic when a
> Component is added to a schematic but I also know that if you change
> stuff in the library for a Component, such as the pins, this information
> is updated in the schematic automatically when you go back to the
> schematic from the library editor (and do a fake add), however the
> fields are not auto copied (wich i was hoping for).

The library symbol is not copied to the schematic component. The
schematic component links to the library component. This is why when
you change a library component, it shows up changed in your schematic
whether you wanted it to or not. The library component fields are
copied to the schematic component fields and take precedence over the
library component fields. This is also why you most likely want add
user defined fields to your schematic components unless you want to
create fully defined component libraries. This behavior will most
likely be changed during the next development cycle.

>
> The thing is that if you add fields to a Components in the schematic
> these changes will "only live" in that schematic. I have to add the
> update to both my schematic and my library if I want the new information
> to also be included in further projects based on my library.

This can be achieved as long as you keep in mind the limitation above.

>
>
> But i guess at this point there is no other way than add the fields manualy to both the schematic and library.
>

Revision history for this message
Friedrich Feichtinger (fritz-feichtinger) said :
#4

Hi there.

I am having this problem to. I am trying to set up a 'design for manufacturing' project, so it is quite necessary to have a library with all the attributes well defined (such as: value, footprint, distributor, manufacturer, manu. part number,...)

Editing all these parameters right into the schematic is not an option, it HAS to be in the library in order to limit the probability of failure to an acceptable value...

> This behavior will most
> likely be changed during the next development cycle.

That's good news. Is it already work in progress? When will this feature be ready?

Thanks a lot!

Kind regards

Friedrich Feichtinger

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#5

I have no idea when we will get around to implementing a sane optional field editor. My best guess is that it would be during the next development cycle but a lot of under the hood coding has to happen to the schematic editor before we could even consider adding a feature like this. I'm working on some of this now but I'm not making much progress due to the upcoming stable release. It most likely will not happen within the next year.

Revision history for this message
Friedrich Feichtinger (fritz-feichtinger) said :
#6

Thanks for your reply.

> I have no idea when we will get around to implementing a sane optional field editor.

I think the field editor is OK as it is. But what I do not understand is this behaviour:

> The library symbol is not copied to the schematic component. The
> schematic component links to the library component. This is why when
> you change a library component, it shows up changed in your schematic
> whether you wanted it to or not. The library component fields are
> copied to the schematic component fields and take precedence over the
> library component fields.

So the geometry of the symbol is linked, but the fields are copied, right? For someone this might be a feature, but for me this sound like a plain BUG.

Isn't there any possibility to just link to the component fields as well?

OR as a workaround: Is there a possibility to insert a little button, and when you press it, it just copies the fields from all the components again?

Thanks a lot.

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#7

On 8/18/2015 5:11 AM, Friedrich Feichtinger wrote:
> Question #268059 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/268059
>
> Friedrich Feichtinger proposed the following answer:
> Thanks for your reply.
>
>> I have no idea when we will get around to implementing a sane optional
> field editor.
>
> I think the field editor is OK as it is. But what I do not understand is
> this behaviour:
>
>> The library symbol is not copied to the schematic component. The
>> schematic component links to the library component. This is why when
>> you change a library component, it shows up changed in your schematic
>> whether you wanted it to or not. The library component fields are
>> copied to the schematic component fields and take precedence over the
>> library component fields.
>
> So the geometry of the symbol is linked, but the fields are copied,
> right? For someone this might be a feature, but for me this sound like a
> plain BUG.

It's not a bug. You see it that way because that is your preferred
workflow. The current symbol field design allows you to either use
fully defined or generic symbols. A fully defined symbol contains all
of the user defined and populated fields that you want copied to your
schematic such as manufacturer, manufacturer part number, vender, vendor
part number, etc when you add a symbol to your schematic. In order for
this to work, every symbol must contain the same fields required by the
user. The KiCad project has no idea of the user's preferred symbol
fields. This is the responsibility of the user. KiCad only provides
generic symbol libraries which includes only the default fields which
are reference designator, value, footprint, and link to documentation
file. If the symbol can have multiple footprints, the KiCad symbol does
not have an assigned footprint. There is nothing preventing you from
using fully defined symbols. You will have to create your own custom
libraries for this purpose.

>
> Isn't there any possibility to just link to the component fields as
> well?

This would eliminate the use of generic symbols.

>
> OR as a workaround: Is there a possibility to insert a little button,
> and when you press it, it just copies the fields from all the components
> again?

This really doesn't serve any purpose. Users must decide how they
prefer to define symbol libraries. I personally do not user fully
defined symbol libraries. I configure my user defined fields in
Eeschema and enter the field data as I design. I don't use a lot of
"standard" parts so fully defined symbol libraries don't really work for
me. KiCad tries not to define a workflow in this regard.

>
> Thanks a lot.
>

Revision history for this message
Friedrich Feichtinger (fritz-feichtinger) said :
#8

OK, I understand there are two different ways how to use library parts.

You say it is the users decision which one to use. But in fact right now in KiCad it is only possible to use the generic method. This is because there is no (reasonable) possibility to update a part in the schematic when you edit a field in a library.

I understand the concept of generic part and a I also like it very much for my smaller, private projects. But imagine you want to design a PCB for manufacturing. This means you have to specify every little thing of your components like manufacturer, manufacturer's part number, distributor, dist part number, footprint and so on. also see:
https://rheingoldheavy.com/design-assembly-kicad/

Now lets assume you have a huge project and there are hundreds of 10k Resistors (all the same kind) distributed over your PCB. Then you find out that the distributor of your resistor does not offer it any longer, so you have to choose a different one. So what do you do? Search the whole schematic and edit (or re-add) all the resistors? No way! Even if there are only 3 resistors, than the chance is realistic that you forget one of them when you change something. This for sure can cause big trouble when it comes to production. (Or even bigger trouble if the error makes it through production...)

So when it comes to professional PCB design, updating fields from the library to the schematic is a very basic task in my mind And as long as KiCad does not support such basic features, I see no chance that professional electronic designers want to use KiCad instead of e.g. Altium Designer.

Here is my proposal: Make a simple button in EESchema that updates all schematic parts from the library.

So if you like to make your design with generic parts from the KiCad-library, just go on as usual. You can add parts, edit values append fields whatever you want. But never click that "update from library" button as it will reset all your component values.

But if you want to make a professional design and make your own library, than you just have to click that button in case that any part from the library has changed.

You can display a big warning message when the button is pressed, I don't mind.

Please think about it. This little button would not cause any damage to the "normal"/private users, but it would bring a LOT of benefit for professional designs!

kind regards, Friedrich Feichtinger

Can you help with this problem?

Provide an answer of your own, or ask Stefan Olsson for more information if necessary.

To post a message you must log in.