7 Reasons for ESRI not to Drop VBA

I recently learned from James Fee’s blog that ArcGIS 9.4 will be the last version that supports VBA. I can see why this is being dropped – Microsoft no longer promotes or updates VBA. Microsoft now promote “Visual Studio Tools for Office” as its replacement for VBA in MS Office products, however VBA is still […]

Getting a Feature Layer by Name

An often required function is to get a specific layer from a current map document. The code below is for VB.NET and requires a map document and uses the alias name of the feature class. The first function returns all IGeoFeature layers in a map – these are layers based on vector geographic data. The […]

Adding Coordinates to a Map Layout

A recent request by an ArcMap was user was how to add the current coordinates of the dataframe to the map layout in ArcMap. I messed around with grids and labelling for a while before resorting to a VBA script. The code below should copied and pasted into the VBA Editor in ArcMap, and run when […]

Another Visual Studio Macro

My start up program when working with ArcObjects is nearly always set to ArcMap.exe As my ArcMap installation had recently moved from an F: drive to a C: drive I had to update this for over a dozen projects. There had to be an easier way (!) so I spent some time trying to find out how […]

Migrating .NET Projects from ArcGIS 9.1 to 9.2

My Windows XP recently decided to fall apart, so after a few days reinstalling everything I decided it would be a good time to switch from ArcGIS 9.1 to 9.2. The installation went smoothly enough, and after a few more hours I had Visual Studio 2005 up and running as well. With some trepidation I […]

No New Objects Added…

 If only Visual Studio would open in the same state that it was closed.. Excluded DLLs in set up packages seem to re-include themselves, projects in solutions disappear, and today an ArcObects command seemed to have disappeared. All had previously been running without problems in debugging mode, opening ArcMap and then stopping at various breakpoints. […]

Some ArcToolbox Commands

A few sample ArcToolbox commands I’ve been using recently. These can be run from the command line available in ArcCatalog (in the menu select Window >> Command Line). workspace C:\MyPath\MyGeoDatabase.mdb Intersect (featureClass1”;’featureDataset1\featureClass2′ ”) my_output_featureClass ALL # INPUT This automates the Intersect tool, found in ArcToolbox under “Analysis Tools >> Overlay >> Intersect” and is useful if […]