Electrical – Cadsoft Eagle Library: How to create device variant

eaglelibrary

I'm creating a custom device in Eagle Library.
Generally I need two device, let's say they're CONN2.54_1 and CONN2.54_2.
These two devices are connectors, they both have 4 pins, thus they have the same symbol. The difference is the package, one is vertical mount and one is horizontal.

Now I can create 2 separate device successfully. However I want to know how to group them under one "sub-category" in the Library?

For example: when I use the add button in the Schematic Editor, my custom Library should appear like:


MY_LIBRARY\ (This is the main library)


  CONN2.54\       (There's a sub-folder name CONN2.54)

      CONN2.54_1  (The first device is inside the sub-category)
      CONN2.54_2  (The second device is also inside the sub-category)

Thank you!

Best Answer

In the library editor, go to your device and you'll see the traditional screen. Here is the "rcl" library - probably the most popular library there is.

enter image description here

On the right side is the package variant section. Here is where you can assign multiple packages to the same device. You simply click on "New," select your new package, give it a useful name, and add it. You can then associate schematic pins to footprint pins with the "Connect" button. You can see in rcl how the resistors use one schematic part but a large number of package variants.