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.
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.
Example
if (symbol) symbol(S) { S.pins(P) printf("Pin: %s\n", P.name); }
Index | Copyright © 2005 CadSoft Computer GmbH |