ArcObjects
GIS
—— C#.NET
2006 9
1
1.1
2.1
1.3
1.4
.................................................................................... 1
ARCOBJECTS .................................................................................2
ArcObjects ...........................................................................2
1.1.1
1.1.2
ArcObjects ...................................................................4
1.1.3 ...........................................................................9
1.2 .....................................................................................13
1.2.1 .............................................................................13
1.2.2 .................................................................15
.NET....................................................................................19
1.3.1 .........................................................................21
1.3.2
.NET Framework .............................................................24
.NETCOM.......................................................26
COMCOM Wrappers................................................27
1.4.1
1.4.2
ESRIPrimary Interop Assemblies...............................30
1.4.3 COM.NET ..............................................................31
1.4.4
COM.NET ..........................................................34
ARCGIS ...............................................................................35
ArcGIS Software Developer Kit (SDK) ..................................35
ESRI Developer Network Web site........................................41
ARCGIS ...................................................................41
1.6.1 VBAArcGIS............................................42
1.6.2 DLLArcGIS.................................................49
1.6.3 .....................................................64
2 ARCMAP ............................................................ 71
APPLICATION ...............................................................................71
IApplication ........................................................................72
IMxApplication...................................................................74
IWindowPostion ................................................................74
IEnumprinterNames .................................................................75
DOCUMENT .................................................................................75
IMxDocument ....................................................................78
IDocumentDefaultSymbols..............................................79
IDocumentEventsIDocumentEventsDisp..................81
2.1.1
2.1.2
2.1.3
2.1.4
2.2.1
2.2.2
2.2.3
2.2
1.5
1.6
1.5.1
1.5.2
i
3
3.2
2.3 ARCMAP..........................................................................82
2.3.1 (StatusBar).............................................................82
2.3.2 (DockableWindow) .......................................84
2.3.3 .....................................................................................85
CommandBars CommandBar....................................86
2.3.4
2.3.5
CommandItem...................................................................89
2.4
UICONTROL ............................................................................90
2.5 EXTENSIONARCGIS ...........................................................91
ARCOBJECTS .............................................. 94
3.1 MAPCONTROL.............................................................................95
3.1.1 .....................................................................................95
3.1.2
MapControlMXD ...................................................97
3.1.3 ...................................................................102
3.1.4 ...................................................................................104
3.1.5 ...........................................................................104
PAGELAYOUTCONTROL ............................................................108
PageLayoutControl MXD......................................109
3.2.1
3.2.2
PageLayoutMapControl............................................. 110
3.2.3 Pagelayout................................................. 112
TOCCONTROL.......................................................................... 115
3.3.1
TOCControl.............................................................. 115
3.3.2 ........................................................................... 118
TOOLBARCONTROL.......................................................122
3.4.1 ...........................................................................................122
3.4.2
ToolbarControl.................................................................124
ToolbarItem..............................................................................127
3.4.3
ToolbarMenu ..............................................................128
3.4.4
3.4.5
CustomizeDialog.....................................................................129
CONTROLCOMMANDS.......................................................................132
3.5.1 ...........................................................................................132
ControlCommands with the ToolbarControl........................132
3.5.2
3.5.3
ControlCommands without the ToolbarControl ..................132
3.6 ...................................................................................134
3.6.1 ...........................................................................................134
3.6.2 ...............................................................138
3.6.3 ...............................................................140
3.6.4 ...............................................................143
3.5
3.3
3.4
ii
4
5
4.1
4.2
4.5
4.5.1
4.5.2
4.5.3
4.2.1
4.2.2
--GEOMETRY .............................................. 149
GEOMETRY................................................................................149
POINTMULTIPOINT ................................................................153
Point..................................................................................153
Multipoint..........................................................................160
4.3 ENVELOPE ...........................................................................163
4.4 (CURVE) ....................................................................................166
4.4.1
Segment...........................................................................168
4.4.2 (Path)........................................................................178
4.4.3 (Ring)............................................................................180
PolyCurve ........................................................................181
4.4.4
GEOMETRY........................................................................187
IGeoemtryCollection.......................................................187
ISegmentCollection ........................................................189
IPointCollection...............................................................190
4.6 ...........................................................................................190
4.7 ...........................................................................................192
4.7.1 .......................................................................192
4.7.2 ...........................................................................195
A0 .............................................................198
4.7.3
4.7.4
SpatialReference ............................................................200
............................................................................ 202
5.1 MAP...........................................................................................202
IMap..................................................................................203
IGraphicsContainer ........................................................206
IActiveView ......................................................................208
IActiveViewEvents .......................................................... 211
IMapBookmark................................................................ 211
ITableCollection............................................................... 211
5.2 ...........................................................................................212
ILayer................................................................................212
5.2.1
5.2.2 ...................................................................................213
5.2.3 CAD ..........................................................221
TIN ....................................................................................224
5.2.4
5.2.5
GraphicsLayer.........................................................................225
SCREENDISPLAY.......................................................................225
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
5.1.6
5.3
iii
5.5
5.6.1
5.6.2
5.6.3
5.6.4
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4 ...........................................................................................229
PageLayout .....................................................................230
Page .................................................................................231
SnapGrid..........................................................................232
SnapGuides.....................................................................233
RulerSettings...................................................................234
ELEMENT...................................................................................234
5.5.1 ...................................................................................235
5.5.2 ...................................................................................241
5.5.3 ...............................................................244
5.6 MAPGRID ..........................................................................245
MapGrid ...........................................................................246
MapGridBorder ...............................................................248
MapGridLabel..................................................................249
MapGridFactory ..............................................................252
5.7 MAPSURROUND........................................................................254
5.7.1 ...................................................................................254
5.7.2 ...............................................................................257
5.7.3 ...............................................................................257
5.7.4 ...........................................................................261
5.8 STYLE................................................................................262
StyleGallery .....................................................................263
StyleSelector ...................................................................265
IStyleDialog......................................................................266
IDENTIFYDIALOG ......................................................................268
................................................................ 271
6.1 ...........................................................................................271
6.1.1
Color .................................................................................274
6.1.2 ...............................................................................275
ColorRamp.......................................................................278
6.1.3
SYMBOL.....................................................................................280
MarkerSymbol.................................................................282
LineSymbol......................................................................285
FillSymbol ........................................................................288
TextSymbol ......................................................................291
3DChartSymbol...............................................................294
6.3 .......................................................................................295
6.2.1
6.2.2
6.2.3
6.2.4
6.2.5
5.8.1
5.8.2
5.8.3
5.9
6
6.2
iv
6.4.1
6.4.2
SimpleRenderer..........................................................297
6.3.1
ClassBreakRenderer..................................................299
6.3.2
UniqueValueRenderer................................................304
6.3.3
ProportionalSymbolRenderer ...................................308
6.3.4
ChartRenderer ................................................................312
6.3.5
6.3.6
DotDensityRenderer...................................................323
6.3.7 ...........................................................326
6.4 .......................................................................................330
TextElement.....................................................................330
ArcObjects ...............................................................333
6.5 .......................................................................336
6.5.1 GeometryFeedback........................................337
6.5.2 ...................................................344
6.5.3 ...........................................................................349
6.5.4 DisplayFeedback ................................................352
............................................................................ 358
7.1 ...............................................................................358
Printer...................................................................................358
7.1.1
Paper ................................................................................360
7.1.2
7.1.3 ...................................................................362
7.2 ...............................................................................363
7.2.1 ...............................................................363
7.2.2 ...............................................................366
7.2.3
ExportFileDialog .............................................................369
........................................................................ 373
8.1
GEODATABASE..............................................................374
8.2 WORKSPACE ................................................................378
8.2.1 ...........................................................................379
8.2.2 ...................................................................................383
8.2.3
PropertySet..............................................................................387
8.2.4 ...................................................................................388
DATASET....................................................................................389
GeoDataset .........................................................................390
FeatureDataset ...............................................................390
8.4 .......................................................................393
Table .................................................................................395
8.3
8.3.1
8.3.2
8.4.1
7
8
v
8.5
9
ObjectClass .....................................................................398
8.4.2
8.4.3
FeatureClass...................................................................401
8.4.4 ...........................................................................403
8.4.5 ...................................................................408
ROWOBJECT FEATURE ................................................414
8.5.1
RowBufferRow ............................................................415
8.5.2
ObjectFeature .............................................................416
8.5.3 .......................................................................420
8.5.4 ...................................................................................423
8.6 ...................................................................................425
8.7 ...............................................................................428
................................................................................ 433
9.1 ...........................................................................................433
Cursor...............................................................................434
9.1.1
QueryFilterSpatialFilter ..............................................435
9.1.2
QueryDef..........................................................................439
9.1.3
9.1.4
TableSort..........................................................................440
9.1.5 ...............................................................................442
9.2 ...................................................................................445
9.2.1
ITopologicalOperator......................................................445
9.2.2 ...................................................................................451
9.3 ...................................................................................457
9.3.1
IRelationaloperator .........................................................457
9.3.2 -- ................461
IPROXIMITYOPERATOR.............................................................465
9.4
9.5 ...........................................................................................468
9.5.1 ...................................................................468
9.5.2 ...............................................................477
10 --MAPEDITING ............................ 480
10.1 IWORKSPACEEDIT ....................................................................480
10.2 MAPEDITING .....................................................................482
10.2.1 ...................................................................................482
10.2.2 ...................................................................................483
ARCCATALOG............................................................ 493
11.1 GXOBJECT ................................................................................495
11
vi