How to use
See How to use ArcGIS samples for help running the sample.
- Double-click the SimpleAddin.esraddin file in developer kit home\java\samples\arcobjects\addin\simpleaddin\lib. A dialog box appears asking if you want to install the add-in. Click Yes to install.
- Start ArcMap.
- Click the Customize menu and click Customize Mode. The Customize dialog box appears.
- Click the Toolbars tab. Scroll down and select the Sample Java Toolbar check box.
- Verify that you can see a toolbar containing the Java Add Layer button, ESRI Fixed Zoom Out command, Java Draw Polygon tool, Java Sample menu containing the Java Add Layer button, and a custom tool palette containing the Draw Polygon tool and Zoom In tool.
- Click the Commands tab.
- Select each category in Step 5, then drag the respective commands onto an existing toolbar.
- Click the Java Add Layer command. This command opens a file chooser and allows you to browse to data.
- Browse to a Shapefile in developer kit home\java\samples\data\usa\states.shp to add the layer to the map.
- Click the Draw Polygon tool and draw a polygon on the map. When finished, this tool creates a solid blue polygon graphic on the map.
- Click the Java ShowDocWin command. This command pens a dockable window.
- Click the Show/Update Layer LayerList button. The states layer shows in the list. You can dock this window anywhere in ArcMap as permitted.
- Open a new document by browsing to developer kit home\java\samples\data\mxds\World.mxd (it is not necessary to save the existing map document). Notice the application extension is getting called and the dockable window is visible.
- Click the Show/Update LayerList button. All the layers for world.mxd show in the list.
- When you click the Customize Menu, then click Extensions, you can see the Java Sample Extension as one of the available extensions.
Development licensing | Deployment licensing |
---|---|
ArcInfo | ArcView |