afkiwers / inventree_kicad

KiCad EDA conform API endpoint for KiCad's parts library tool. This plugin provides metadata only and requires matching symbol and footprint libraries within the KiCad EDA.
MIT License
35 stars 7 forks source link

Question on the Kicad http-lib interaction with inventree_kicad #94

Closed JacobEFO closed 3 months ago

JacobEFO commented 5 months ago

Hi afkiwers,

Now I am not well versed on the interaction between Kicad via the HTTP library and inventree, but I do have two questions.

First Question When accessing components from Inventree via Kicad's HTTP library, the component name from Inventree will in Kicad be used both as item and description. See for instance my example with a resistor:

image

Here it nicely illustrates that my component name CRCW08051K00FK is used as both item and description. While you can search for what is given in the component's actual description, it is superfluous to have the component name twice in the same sparse overview. Is there any way I can control this, perhaps via the Kicad HTTPlib file.

Second Question When including IPN from the KiCad Library Endpoint, the IPN will always appear dead center in the component, as illustrated below:

image

If I were to add IPN as a field in the symbol referenced (here an 'R'), the HTTP will just ignore its placement and add a second field to said component.

Can I somehow control this functionality, so I can have all my symbols pre-define where the IPN should appear, so I don't have to drag IPN around for all my instantiations?

afkiwers commented 5 months ago

Hi @JacobEFO,

what version of the plugin are you using?

Would you be able to provide a screenshot of your settings, like this one here?

image

afkiwers commented 5 months ago

Regarding your IPN location issue. KiCad does not accept coordinates for any fields. However, what you can do is modify the R symbol and add a Field called IPN to it like below.

image

KiCad will then simply override the field with the new value. Please not that you will see IPN twice inside the symbol chooser dialog; however, only the most recent one is carried over into the schematic.

image

image

JacobEFO commented 5 months ago

Hi @JacobEFO,

what version of the plugin are you using?

Would you be able to provide a screenshot of your settings, like this one here?

image

Hi afkiwers, Sorry for my late reply, I wasn't given any notifications that you had replied. I use the following version:

image

As a side-note, I can say without having done anything but restarting my inventree server, KiCad now shows me the right description:

image

I was also so sure, that it had previously worked with showing the description.

JacobEFO commented 5 months ago

Regarding your IPN location issue. KiCad does not accept coordinates for any fields. However, what you can do is modify the R symbol and add a Field called IPN to it like below.

image

KiCad will then simply override the field with the new value. Please not that you will see IPN twice inside the symbol chooser dialog; however, only the most recent one is carried over into the schematic.

image

image

Thanks for the suggestion, this is exactly what I tried because that works when using sqlite database libraries.

I have created the symbol as the following:

image

KiCad's component placement snapshot:

image

Placed component:

image

I have previously made sure to untick Automatically place symbol fields in the settings, because that did the trick with odb libs:

image

But as you can see, it does not take effect here. I have had the same issues on nightly (where I am now) and in 8.0 and 8.0.1.

afkiwers commented 5 months ago

It does work for me with the latest KiCad version.I am not sure what your KiCad is doing though.

If you added that field and saved it, then it should be there.

Have you tried to place it as raw symbol R (not from InvenTree) and checked that the IPN shows up where it is supposed to be?

JacobEFO commented 5 months ago

It does work for me with the latest KiCad version.I am not sure what your KiCad is doing though.

If you added that field and saved it, then it should be there.

Have you tried to place it as raw symbol R (not from InvenTree) and checked that the IPN shows up where it is supposed to be?

Yes, it does indeed show up:

image

You happen to run KiCad on a different OS? I run mine on MacOs Monterey (v12)

afkiwers commented 5 months ago

Windows

JacobEFO commented 5 months ago

Windows

Interesting. You simply add a new field with the IPN as name to the R symbol, and when you instantiate the resistor from the HTTP lib it inherits the position you've given it in the symbol?

What settings do you have for the schematic editor and for the IPN field in the symbol?

I might consider opening a bug report for this. When I do this for ODB libraries it correctly inherits the position but not for HTTP library.

JacobEFO commented 3 months ago

@afkiwers I think we can close this, it was resolved in some subsequent version of KiCad such that the 'IPN' would now adhere to the placement in the symbol.