Transfer custom Fields from Schematic to PCBnew?

Kicad 6.00 seems like fixing a huge heap of things

This is awesome! Just opened up a feature request to implement KiCad MPN import in our import process. This will automatically use the MPN attribute to assign parts on our end. To speed things up a bit, does anyone have a Python code snippet which iterates of the parts and accesses the part property?

1 Like

Itā€™s not possible to access properties from python yet but itā€™s about to change

See test in that MR for examples.

1 Like

Perfect! Will use your MR for example, should make implementation a breeze. As soon as weā€™ve a basic implementation running Iā€™ll give a hands up here to get some test data.

5 Likes

Please do! I am quite willing to help out!

1 Like
The required feature is not available in 5.1.6 and 5.1.9. Might be available in 5.99 in the future, since it is under development.

We are currently working on automatically importing all parts including their MPN, if documented as property. While doing so, I noticed the ā€œSupplier and refā€ column on the BOM CSV export. Does anyone of you know how this is populated?

@AndersG yesterday we deployed an upgrade to our KiCad Integration. Components with an attribute AISLER_MPN are now automatically assigned. Would be great if you could give it a try!

2 Likes

Cool! Will definitely try that. So I should put the manufacturer part number in AISLER_MPN?

I will have to redo some of the board as well as you only have the QFN variant of the FTDI VNC2. The board was laid out for the TQFP32 footprint for ease of soldering.

Yes, put the complete MPN in AISLER_MPN property. This is important because if there is no clear match we do not assign the part, if we would to so there is risk of auto-assigning wrong variants.

1 Like

Just thought to mention - I could not add AISLER_MPN property to PCB board file before I configured it in Preferences like this:

After doing this and updating the board from schematic I could see the properties added. I tested it by uploading the board to Aisler and it worked.

1 Like

Actually ignore that, I just noticed all properties were copied over, Iā€™m not sure why it did not happen first time around. I mustā€™ve done something else as well.

1 Like

Thank you very much for implementing this feature. This could safe me a lot of hassle.

However I also use the kicost package to create a BOM with all the parts costs. That specifically likes to use the ā€œmanf#ā€ or ā€œmpnā€ property of the schematic. So that differs from your current workflow. Fortunately the tool also needs the exact part number from the manufacturer in order to works.

In order to use the feature I would have to rename all my ā€œmpnā€ fields to ā€œAISLER_MPNā€. While this would be doable using sed or vi. This still mandates a manual action.

Would it be possible to add an option to the website to specify which field can be used for the automatic part selection?

Since I also use kicost to create a nice BOM, I made the following bash script to convert the ā€˜mpnā€™ to ā€˜AISLER_MPNā€™ in a d kicad_pcb file.

pcb4aisler.sh (748 Bytes)

1 Like

@aisler: I had some strange behavior with the automatic transfer after refreshing the parts for a new revision of my board. Some valid AISLER_MPNā€™s were not recognized. But that did not gave me too much headaches. The following posed less fun.

All parts that I gave the property AISLER_MPN = ā€˜-ā€™ received the ā€˜magic matchā€™ MPN instead of not being recognized and remaining empty (which was the idea). Namely the: ā€œYageo RC1206FR-0710KLā€

The MPN does not match a complete part number in this case. This is quite dangerous behavior. Fortunaly I saw that the MPN for the capacitors didnā€™t match. If I go to the partlist for my board and add a part and search for ā€œ-ā€, I see the same result.

Also the magic match for low resistance values gave me some headache. I finally figured out I need to give my resistors for 100 Ohm the value of ā€œ100Rā€ (instead of ā€œ100Eā€). It would be nice if the documentation would mention that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.