EAGLE Help Light

package()

Funkce
Opens a package context.

Zápis
package(identifier) statement

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

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

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

Viz také library, deviceset, symbol

Check if there is a package

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

Příklad


if (package)
   package(P) {
     P.contacts(C)
       printf("Contact: %s\n", C.name);
     }


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