File: 274.htm

package info (click to toggle)
eagle 4.16-5
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 36,508 kB
  • sloc: sh: 82; makefile: 32
file content (80 lines) | stat: -rw-r--r-- 2,217 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<title>EAGLE Help: board()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>board()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Opens a board context.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>board(identifier) statement</tt>
<p>
<dt>
<b>Description</b>
<dd>
The <tt>board</tt> statement opens a board context if the current editor
window contains a board drawing. A variable of type
<a href=164.htm>UL_BOARD</a> is created and is given
the name indicated by <tt>identifier</tt>.
<p>
Once the board context is successfully opened and a board variable has been
created, the <tt>statement</tt> is executed. Within the scope of the
<tt>statement</tt> the board variable can be accessed to retrieve further
data from the board.
<p>
If the current editor window does not contain a board drawing, an error
message is given and the ULP is terminated.
<p>
</dl>
<b>See also</b> <a href=279.htm>schematic</a>,
<a href=276.htm>library</a>
<p>
<b>Check if there is a board</b>
<p>
By using the <tt>board</tt> statement without an argument you can check
if the current editor window contains a board drawing. In that case,
<tt>board</tt> behaves like an integer constant, returning <tt>1</tt> if
there is a board drawing in the current editor window, and <tt>0</tt>
otherwise.
<p>
<b>Accessing board from a schematic</b>
<p>
If the current editor window contains a schematic drawing, you can still
access that schematic's board by preceding the <tt>board</tt> statement
with the prefix <tt>project</tt>, as in
<pre>
project.board(B) { ... }
</pre>
This will open a board context regardless whether the current editor window
contains a board or a schematic drawing. However, there must be an editor
window containing that board somewhere on the desktop!
<p>
<b>Example</b>
<pre>
if (board)
   board(B) {
     B.elements(E)
       printf("Element: %s\n", E.name);
     }
</pre>

<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright &copy; 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>