Skip navigation.
Home

How to Install ArcObjects Developer Sample Programs

The ArcObjects Developer Kit contains numerous ArcGIS utility commands and routines that may find very useful.

Installing the samples is not as easy as ESRI makes to appear. Here's the lowdown on how it's done.

Install the ArcObjects Developer Kit from the ArcGIS install CD if you haven't already done so.

Click Start->Programs>ArcGIS->ArcObjects Developer Help and locate the sample that you wish to install. Read the install instructions.

Locate the sample on your hard drive using Windows Explorer (not always an easy task). You can use Windows Find/Search to search for the directory or one of the files to make the task a little easier.

First - the easy way (if only commands are implemented)

Right click on any toolbar.

Select Customize...

Click "Add from File"

Select the dll file containing the command, e.g. C:/arcgis/arcexe83/ArcObjects Developer Kit/Samples/ArcMap/Map Production/TextStamper/TextStamper.dll

The command will be added to the Developer Samples category. Drag and drop the command to any toolbar.

The hard way - for samples that implement other categories (e.g command bars)

Open an MSDOS (CMD) window and CD to that directory.

COGO:

CD "C:/arcgis/arcexe83/ArcObjects Developer Kit/Samples/Editing/Coordinate Geometry"

Parcel Split and Combine Wizard:

CD "C:/arcgis/arcexe83/ArcObjects Developer Kit/Samples/Editing/Edit Commands/Parcel Split and Combine"

If a file named _INSTALL.BAT exists: Run it in the CMD window and note any error messages.

Note: many of the _INSTALL.BAT scripts assume that your windows directory is C:/WINNT. You may need to edit _INSTALL.BAT and replace C:/WINNT with C:/WINDOWS if you are running Windows 2000 or XP.

Re-run _INSTALL.BAT and again to be sure that there are no error messages. It doesn't hurt to run it more than once.

If a file named _INSTALL.BAT does NOT exist:

Register all DLLs in the directory e.g. regsvr32 parcelngprj.dll Run C:/arcgis/arcexe83/Bin/categories.exe (I suggest creating a shortcut in a convenient place if you wish to install several examples) Follow the instructions in the ArcObjects help for that sample and register the component(s) of the sample. Click on and highlight the category where the compent should be added (e.g. ESRI Mx Commands) Click the Add Object Button. Find the dll that you wish to register and click open. Select the component(s) that you wish to register.

To add a command to a toolbar:

Right click on any toolbar.

Select Customize...

Optionally click on the New button to create a new toolbar. Name it and select save in normal.mxt (so that it will be available to all of your ArcMap maps.

The new toolbar will appear.

Click the Commands tab.

Click Developer Samples in Categories

Drag and drop and command(s) to your toolbar VBA macros (subroutines having no parameters) an also be added to toolbars, they are listed in the macros category. I suggest storing your commonly used macros in normat.mxt (or your custom template) to make them available for all maps.