EAGLE Help

sheet()


Function
Opens a sheet context.

Syntax
sheet(identifier) statement

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

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

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

See also schematic

Check if there is a sheet

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

Example

if (sheet)
   sheet(S) {
     S.parts(P)
       printf("Part: %s\n", P.name);
     }

Index Copyright © 2005 CadSoft Computer GmbH