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