Opens a symbol context.

symbol(identifier) statement

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

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

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

See also library, deviceset, package

Check if there is a symbol

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


if (symbol)
   symbol(S) {
       printf("Pin: %s\n", P.name);

Index Copyright © 2005 CadSoft Computer GmbH