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

Featurerequest: Virtual Parameters #70

Open TimGoll opened 8 months ago

TimGoll commented 8 months ago

I'm not 100% sure if this is the right place to ask. Maybe this should be directed at inventree itself. But I try it here first anyway.

I'm using this tool to import LCSC parts into inventree. I'm not sure that this is the best way to do it, but this is how I do it right now.

It works really good, but it adds stuff such as the Supplier Part Number to the supplier tab. Which makes sense if you look at it that way. However I'm unable to get this value in KiCad and I'd like to have the LCSC Part # as a parameter in KiCad so the exported BOM works to order the PCBs.

The easiest solution for me would be to edit the aforementioned tool. But I'm wondering if you could add to your addon some sort of virtual parameter that adds the LCSC part number (or any MPN for that matter) to the KiCad parameters.

Maybe something in this menu: image

Sorry for the rambling and feel free to close if this is out of scope for this addon!

afkiwers commented 8 months ago

Could you send through some screenshots of the data you want in kicad?

TimGoll commented 8 months ago

Mainly this one:

image

But it probably needs a different name so that the KiCad JLC Plugin accepts it. Here's a list of the names that are accepted so it would probably be best to be able to define it in the UI.

Also the name / value are something that I'm not that much of a fan of: image

I set the value to the part value (which is fine, even though I'd like it to be shortened automatically to 2u2 for example; but I can do that by modifying the import tool I guess), but the name is a bit annoying. The name is fine in inventree, in fact I think it is even a good name, but it is confusing in KiCad imho. I'd like it to be something like 100n_0402_LCSC or so - but without modifying the actual name in InvenTree.

Again, I'm not sure if this is in scope for this addon or if this is even something anyone would want from it. Maybe this is just my weird way of using it. But as a general feedback, this is something that bothers me.

TimGoll commented 8 months ago

I'd like to also add that the last point is only something I'd want for basic parts such as capacitors. Because I'll have quite a lot of them in the list and it would make it easier to find them in KiCad if their name was less cryptic.

So if this is something you'd like to add, then it is something that should be in the categories settings

afkiwers commented 8 months ago

The plugin should only provide "non-volatile" data to KiCad to keep the schematic simple and consistent over time. Let's say your supplier is shutting down and you would need a new one, KiCad would still display the old supplier unless updated.

InvenTree got the facilities to cater for that.

TimGoll commented 8 months ago

So I guess it comes down to me being unfamiliar with InvenTree

afkiwers commented 8 months ago

We actually work the other way around. We import BOMs from KiCad into InvenTree part assembly BOMs which then shows you what's in stock and what's missing. Then you can create a purchase order for a specific distributor and upload that as csv file almost straight into your cart. Has been working like a treat so far.

I think there are actually plugins in the work which will automate that even more.

TimGoll commented 8 months ago

Looking forward to it! This is still all a bit new to me and I have yet to learn what is coming. Is there somewhere a resource for stuff like this? So I can read into it more? Because this list seems to be a bit out of date

afkiwers commented 8 months ago

The InvenTree's docs are quite good I think. It's just a lot to go through.

It helps to have a look at InvenTree's demo server. It's pretty cool what it can do.

afkiwers commented 7 months ago

@TimGoll just letting you know that I am currently looking into adding this feature.

TimGoll commented 4 months ago

awesome, I'm looking forward to it