EAGLE Help Light

deviceset()

Funkce
Opens a device set context.

Zápis
deviceset(identifier) statement

Description
The deviceset statement opens a device set context if the current editor window contains a device drawing. A variable of type UL_DEVICESET is created and is given the name indicated by identifier.

Once the device set context is successfully opened and a device set variable has been created, the statement is executed. Within the scope of the statement the device set variable can be accessed to retrieve further data from the device set.

If the current editor window does not contain a device drawing, an error message is given and the ULP is terminated.

Viz také package, symbol, library

Check if there is a device set

By using the deviceset statement without an argument you can check if the current editor window contains a device drawing. In that case, deviceset behaves like an integer constant, returning 1 if there is a device drawing in the current editor window, and 0 otherwise.

Příklad


if (deviceset)
   deviceset(D) {
     D.gates(G)
       printf("Gate: %s\n", G.name);
     }


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH