File: 161.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 (169 lines) | stat: -rw-r--r-- 4,905 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<html>
<head>
<title>EAGLE Help: Object Types</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>Object Types</center></h1>
<hr>
The EAGLE data structures are stored in three binary file types:
<ul>
<li>Library (*.lbr)
<li>Schematic (*.sch)
<li>Board (*.brd)
</ul>
These data files contain a hierarchy of objects.
In a User Language Program you can access these hierarchies through their
respective builtin access statements:
<pre>
<a href=276.htm>library</a>(L) { ... }
<a href=279.htm>schematic</a>(S) { ... }
<a href=274.htm>board</a>(B) { ... }
</pre>
These access statements set up a context within which you can access all of the
objects contained in the library, schematic or board.
<p>
The properties of these objects can be accessed through <i>members</i>.
<p>
There are two kinds of members:
<ul>
<li>Data members
<li>Loop members
</ul>
<u>Data members</u> immediately return the requested data from an object.
For example, in
<pre>
board(B) {
  printf("%s\n", B.name);
  }
</pre>
the data member <i>name</i> of the board object <i>B</i> returns
the board's name.<br>
Data members can also return other objects, as in
<pre>
board(B) {
  printf("%f\n", B.grid.size);
  }
</pre>
where the board's <i>grid</i> data member returns a grid object,
of which the <i>size</i> data member then returns the grid's size.
<p>
<u>Loop members</u> are used to access multiple objects of the same
kind, which are contained in a higher level object:
<pre>
board(B) {
  B.elements(E) {
    printf("%-8s %-8s\n", E.name, E.value);
    }
  }
</pre>
This example uses the board's <i>elements()</i> loop member function
to set up a loop through all of the board's elements. The block following
the <tt>B.elements(E)</tt> statement is executed in turn for each element,
and the current element can be referenced inside the block through the name
<tt>E</tt>.
<p>
Loop members process objects in alpha-numerical order, provided they
have a name.
<p>
A loop member function creates a variable of the type necessary to hold
the requested objects. You are free to use any valid name for such a
variable, so the above example might also be written as
<pre>
board(MyBoard) {
  B.elements(TheCurrentElement) {
    printf("%-8s %-8s\n", TheCurrentElement.name, TheCurrentElement.value);
    }
  }
</pre>
and would do the exact same thing. The scope of the variable created by a
loop member function is limited to the statement (or block) immediately
following the loop function call.
<p>
Object hierarchy of a Library:
<pre>
<a href=179.htm>LIBRARY</a>
  <a href=174.htm>GRID</a>
  <a href=178.htm>LAYER</a>
  <a href=171.htm>DEVICESET</a>
    <a href=170.htm>DEVICE</a>
    <a href=173.htm>GATE</a>
  <a href=181.htm>PACKAGE</a>
    <a href=182.htm>PAD</a>
    <a href=192.htm>SMD</a>
    <a href=166.htm>CIRCLE</a>
    <a href=175.htm>HOLE</a>
    <a href=187.htm>RECTANGLE</a>
    <a href=194.htm>TEXT</a>
    <a href=196.htm>WIRE</a>
    <a href=186.htm>POLYGON</a>
      <a href=196.htm>WIRE</a>
  <a href=193.htm>SYMBOL</a>
    <a href=184.htm>PIN</a>
    <a href=166.htm>CIRCLE</a>
    <a href=187.htm>RECTANGLE</a>
    <a href=194.htm>TEXT</a>
    <a href=196.htm>WIRE</a>
    <a href=186.htm>POLYGON</a>
      <a href=196.htm>WIRE</a>
</pre>
Object hierarchy of a Schematic:
<pre>
<a href=188.htm>SCHEMATIC</a>
  <a href=174.htm>GRID</a>
  <a href=178.htm>LAYER</a>
  <a href=179.htm>LIBRARY</a>
  <a href=190.htm>SHEET</a>
    <a href=166.htm>CIRCLE</a>
    <a href=187.htm>RECTANGLE</a>
    <a href=194.htm>TEXT</a>
    <a href=196.htm>WIRE</a>
    <a href=186.htm>POLYGON</a>
      <a href=196.htm>WIRE</a>
    <a href=183.htm>PART</a>
      <a href=176.htm>INSTANCE</a>
    <a href=165.htm>BUS</a>
      <a href=189.htm>SEGMENT</a>
        <a href=194.htm>TEXT</a>
        <a href=196.htm>WIRE</a>
    <a href=180.htm>NET</a>
      <a href=189.htm>SEGMENT</a>
        <a href=177.htm>JUNCTION</a>
        <a href=185.htm>PINREF</a>
        <a href=194.htm>TEXT</a>
        <a href=196.htm>WIRE</a>
</pre>
Object hierarchy of a Board:
<pre>
<a href=164.htm>BOARD</a>
  <a href=174.htm>GRID</a>
  <a href=178.htm>LAYER</a>
  <a href=179.htm>LIBRARY</a>
  <a href=166.htm>CIRCLE</a>
  <a href=175.htm>HOLE</a>
  <a href=187.htm>RECTANGLE</a>
  <a href=194.htm>TEXT</a>
  <a href=196.htm>WIRE</a>
  <a href=186.htm>POLYGON</a>
    <a href=196.htm>WIRE</a>
  <a href=172.htm>ELEMENT</a>
  <a href=191.htm>SIGNAL</a>
    <a href=169.htm>CONTACTREF</a>
    <a href=186.htm>POLYGON</a>
      <a href=196.htm>WIRE</a>
    <a href=195.htm>VIA</a>
    <a href=196.htm>WIRE</a>
</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>