editable | int (see note) |
description | string (see note) |
grid | UL_GRID |
headline | string |
id | string (see note) |
name | string (LIBRARY_NAME_LENGTH, see note) |
devices() | UL_DEVICE |
devicesets() | UL_DEVICESET |
layers() | UL_LAYER |
footprints() | UL_FOOTPRINT (new as of EAGLE 9.1, see note) |
packages3d() | UL_PACKAGE3D |
symbols() | UL_SYMBOL |
LIBRARY_NAME_LENGTH | max. recommended length of a library name (used in formatted output only) |
The devices() member loops through all the package variants and technologies of all UL_DEVICESETs in the library, thus resulting in all the actual device variations available. The devicesets() member only loops through the UL_DEVICESETs, which in turn can be queried for their UL_DEVICE members.
The footprints() member is new as of EAGLE 9.1. For backwards compatibility with previous EAGLE versions, packages() is available as an alias.
The description member returns the complete descriptive text as defined with the DESCRIPTION command, while the headline member returns only the first line of the description, without any HTML tags. When using the description text keep in mind that it may contain newline characters ('\n'). The description and headline information is only available within a library drawing, not if the library is derived form a UL_BOARD or UL_SCHEMATIC context.
If the library is derived form a UL_BOARD or UL_SCHEMATIC context, name returns the pure library name (without path or extension). Otherwise, it returns the full library file name.
The id member is only applicable if this UL_LIBRARY refers to a managed library. If not, id will be the empty string.
The editable member returns the value 1, if the library is editable by the user (the user owns the library). Otherwise it returns 0.
library(L) {
L.devices(D) printf("Dev: %s\n", D.name);
L.devicesets(D) printf("Dev: %s\n", D.name);
L.footprints(F) printf("Fpt: %s\n", F.name);
L.packages3d(P) printf("3dp: %s\n", P.name);
L.symbols(S) printf("Sym: %s\n", S.name);
}
schematic(S) {
S.libraries(L) printf("Library: %s\n", L.name);
}