activedevice | UL_DEVICE (see note) |
area | UL_AREA |
description | string |
headline | string (see note) |
library | string |
libraryurn | string (see note) |
libraryversion | int (see note) |
locallymodified | int (see note) |
librarylocallymodified | int (see note) |
name | string (DEVICE_NAME_LENGTH) |
prefix | string (DEVICE_PREFIX_LENGTH) |
urn | string (see note) |
value | string ("On" or "Off") |
devices() | UL_DEVICE |
gates() | UL_GATE |
See also UL_DEVICE, UL_LIBRARY, UL_PART
DEVICE_NAME_LENGTH | max. recommended length of a device name (used in formatted output only) |
DEVICE_PREFIX_LENGTH | max. recommended length of a device prefix (used in formatted output only) |
If a deviceset is currently edited in a library editor window, the activedevice member returns the active device, selected by a PACKAGE command. It can be used as a boolean function to check the availability of such an activedevice (see example below).
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 urn contains a unique identifier for this deviceset, of the form urn:adsk.eagle:component:123/4
, where the portion after the / is the version of the deviceset. To get the base URN (without version), use urnbase()
; to get the version, use urnversion()
.
The libraryurn and libraryversion are only applicable if this UL_DEVICESET comes from a managed library. If not, libraryurn will be the empty string and libraryversion will be -1.
The locallymodified member will be 0, if this UL_DEVICESET doesn't have local modifications, or 1, if this UL_DEVICESET has local modifications. The librarylocallymodified member will be 0 (if this UL_DEVICESET doesn't come from a locally-modified library) or 1 (if this UL_DEVICESET comes from a locally-modified library).
library(L) {
L.devicesets(D) {
printf("Device set: %s, Description: %s\n", D.name, D.description);
D.gates(G) {
printf("\t%s\n", G.name);
}
}
}
if (deviceset)
deviceset(DS) {
if (DS.activedevice)
printf("Active Device: %s\n", DS.activedevice.name);
}