ulp_en.pdf

(984 KB) Pobierz
651880153 UNPDF
EAGLE
E ASILY A PPLICABLE G RAPHICAL L AYOUT E DITOR
User Language
Version 5.4
®
Copyright © 2009 CadSoft
All rights reserved
651880153.003.png
 
EAGLE User Language
Table Of Contents
User Language.........................................................................................................12
Writing a ULP..........................................................................................................12
Executing a ULP.......................................................................................................13
Syntax......................................................................................................................13
Whitespace..............................................................................................................13
Comments................................................................................................................14
Directives.................................................................................................................14
#include..................................................................................................................14
Portability note..................................................................................................15
#require...................................................................................................................15
#usage.....................................................................................................................15
Example.............................................................................................................16
Keywords.................................................................................................................16
Identifiers................................................................................................................16
Constants.................................................................................................................17
Character Constants.................................................................................................17
Integer Constants.....................................................................................................17
Examples...........................................................................................................17
Real Constants.........................................................................................................17
Examples...........................................................................................................18
String Constants......................................................................................................18
Escape Sequences....................................................................................................18
Examples...........................................................................................................19
Punctuators..............................................................................................................19
Brackets...................................................................................................................19
Parentheses..............................................................................................................20
Braces......................................................................................................................20
Comma....................................................................................................................20
Semicolon................................................................................................................20
Colon.......................................................................................................................21
Equal Sign................................................................................................................21
Data Types...............................................................................................................21
char..........................................................................................................................21
int............................................................................................................................21
real...........................................................................................................................22
string........................................................................................................................22
Implementation details......................................................................................22
Type Conversions.....................................................................................................23
Page 2 of 132
651880153.004.png
EAGLE User Language
Typecast...................................................................................................................23
Object Types.............................................................................................................23
UL_ARC...................................................................................................................26
Constants...........................................................................................................26
Note...................................................................................................................26
Example.............................................................................................................26
UL_AREA.................................................................................................................26
Example.............................................................................................................27
UL_ATTRIBUTE........................................................................................................27
Constants...........................................................................................................27
Note...................................................................................................................27
Example.............................................................................................................28
UL_BOARD..............................................................................................................28
Note...................................................................................................................28
Example.............................................................................................................28
UL_BUS....................................................................................................................29
Constants...........................................................................................................29
Example.............................................................................................................29
UL_CIRCLE..............................................................................................................29
Example.............................................................................................................29
UL_CLASS................................................................................................................29
Note...................................................................................................................30
Example.............................................................................................................30
UL_CONTACT..........................................................................................................30
Constants...........................................................................................................30
Note...................................................................................................................30
Example.............................................................................................................30
UL_CONTACTREF....................................................................................................31
Example.............................................................................................................31
UL_DEVICE..............................................................................................................31
Constants...........................................................................................................31
Note...................................................................................................................32
Examples...........................................................................................................32
UL_DEVICESET........................................................................................................32
Constants...........................................................................................................33
Note...................................................................................................................33
Example.............................................................................................................33
UL_ELEMENT..........................................................................................................33
Constants...........................................................................................................34
Note...................................................................................................................34
Examples...........................................................................................................34
UL_FRAME...............................................................................................................35
Constants...........................................................................................................35
Page 3 of 132
651880153.005.png
EAGLE User Language
Note...................................................................................................................35
Example.............................................................................................................35
UL_GATE..................................................................................................................35
Constants...........................................................................................................36
Note...................................................................................................................36
Example.............................................................................................................36
UL_GRID..................................................................................................................36
Constants...........................................................................................................36
Note...................................................................................................................36
Example.............................................................................................................37
UL_HOLE.................................................................................................................37
Note...................................................................................................................37
Example.............................................................................................................37
UL_INSTANCE..........................................................................................................37
Constants...........................................................................................................38
Note...................................................................................................................38
Example.............................................................................................................38
UL_JUNCTION.........................................................................................................39
Example.............................................................................................................39
UL_LABEL................................................................................................................39
Note...................................................................................................................39
Example.............................................................................................................40
UL_LAYER................................................................................................................40
Constants...........................................................................................................40
Example.............................................................................................................41
UL_LIBRARY............................................................................................................41
Constants...........................................................................................................42
Note...................................................................................................................42
Example.............................................................................................................42
UL_NET....................................................................................................................42
Constants...........................................................................................................42
Note...................................................................................................................43
Example.............................................................................................................43
UL_PACKAGE...........................................................................................................43
Constants...........................................................................................................44
Note...................................................................................................................44
Example.............................................................................................................44
UL_PAD....................................................................................................................44
Constants...........................................................................................................45
Note...................................................................................................................45
Example.............................................................................................................46
UL_PART..................................................................................................................46
Constants...........................................................................................................46
Note...................................................................................................................46
Page 4 of 132
651880153.001.png
EAGLE User Language
Example.............................................................................................................47
UL_PIN.....................................................................................................................47
Constants...........................................................................................................47
Note...................................................................................................................48
Example.............................................................................................................48
UL_PINREF..............................................................................................................49
Example.............................................................................................................49
UL_POLYGON..........................................................................................................49
Constants...........................................................................................................50
Note...................................................................................................................50
Polygon width....................................................................................................50
Partial polygons.................................................................................................50
Example.............................................................................................................51
UL_RECTANGLE......................................................................................................51
Example.............................................................................................................52
UL_SCHEMATIC.......................................................................................................52
Note...................................................................................................................52
Example.............................................................................................................52
UL_SEGMENT..........................................................................................................52
Note...................................................................................................................53
Example.............................................................................................................53
UL_SHEET...............................................................................................................53
Example.............................................................................................................54
UL_SIGNAL..............................................................................................................54
Constants...........................................................................................................54
Example.............................................................................................................54
UL_SMD...................................................................................................................54
Constants...........................................................................................................54
Note...................................................................................................................55
Example.............................................................................................................55
UL_SYMBOL............................................................................................................55
Constants...........................................................................................................56
Note...................................................................................................................56
Example.............................................................................................................56
UL_TEXT..................................................................................................................56
Constants...........................................................................................................56
Note...................................................................................................................57
Example.............................................................................................................57
UL_VIA.....................................................................................................................57
Constants...........................................................................................................57
Note...................................................................................................................57
Example.............................................................................................................58
UL_WIRE.................................................................................................................58
Constants...........................................................................................................58
Page 5 of 132
651880153.002.png
Zgłoś jeśli naruszono regulamin