Opens a device set context.

deviceset(identifier) statement

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.

See also 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.


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

Index Copyright © 2005 CadSoft Computer GmbH