How to use {{MPN or DEVICE}} properly


I’m creating a library and stumbled at behaviour which looks buggy to me, or maybe I don’t fully understand how it should work.

For example, assume I want to create a 74HC00 device. First, I create symbols and component - upon here everything is fine. I set a “Default value” for the component to “{{MPN or DEVICE}}”.

The I create a device named “74HC00” (this name should become a {{DEVICE}}, am I right?), and populate a list of part numbers with “SN74HC00N” (which later should appear as {{MPN}}?). So in Add component dialog it looks like this:

When I try to add this component to schematic, I see this behavior:

  1. if I add just a component - I see no value under symbols (which looks correct)

  2. if I add a component selecting the device - I also see no value. Here I expect to see “74HC00” since {{MPN}} is empty, but I selected the device

  3. if I add a component with selected part number, I see part number under symbols. This also looks correct

And the second thing which looks somewhat weird is that in Board Editor {{MPN}} seems to be ignored - in the cases 2 and 3 from above I always see “74HC00”. Maybe I misunderstand the concept of part numbers list, in this case please explain me how to use it properly.


Many thanks for any help!


This is currently a limitation of the underlying concept of LibrePCB. Even if you select a device, it is actually not copied into the project’s library. Only its UUID is stored in the project. So the schematic editor cannot know the name of the device, thus not displaying it.

The device is only copied into the project once you actually add it to a board. Then the device name will also appear in the schematic editor. I am aware this is a bit confusing and I think some day we’ll improve that. But at least it’s expected behavior.

This is indeed not expected behavior :see_no_evil: I’ll open an issue for that. Thanks for reporting!

1 Like

Thank you for your answer!

Yes, I can confirm that after adding to board, case 2 works (device name appears in schematic). Hopefully, one day it will get sorted out, but for now I think I can live with this :+1:

1 Like