Object Types
The EAGLE data structures are stored in three binary file types:
These data files contain a hierarchy of objects. In a User Language Program you can access these hierarchies through their respective builtin access statements:
These access statements set up a context within which you can access all of the objects contained in the library, schematic or board.
The properties of these objects can be accessed through members.
There are two kinds of members:
- Data members
- Loop members
Data members immediately return the requested data from an object. For example, in
the data member name of the board object B returns the board's name.
Data members can also return other objects, as in
where the board's grid data member returns a grid object, of which the size data member then returns the grid's size.
Loop members are used to access multiple objects of the same kind, which are contained in a higher level object:
This example uses the board's elements() loop member function to set up a loop through all of the board's elements. The block following the B.elements(E) statement is executed in turn for each element, and the current element can be referenced inside the block through the name E.
Loop members process objects in alpha-numerical order, provided they have a name.
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
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.
Object hierarchy of a Library:
Object hierarchy of a Schematic:
Object hierarchy of a Board: