What's new for VBA developers with ArcGIS 10


Important Deprecation Notice for VBA users 
ESRI will no longer support VBA as a development platform beyond ArcGIS 10. Users who have custom functionality built using VBA are strongly encouraged to rewrite it using a supported development language such as Python, VB.NET, or C# to ensure that it continues to be operational and supported with future releases of ArcGIS.  The topic Migrating VBA customizations to ArcGIS 10 provides some guidance.

New Features

The following list provides a brief overview of new features in ArcGIS Desktop at 10 that may be of interest to developers.
  • Add-ins for customizing ArcGIS Desktop
    At 10, you can create add-ins to add custom functionality to your ArcGIS Desktop applications. Add-ins provide a simple and light-weight approach to most common customizations such as custom buttons, tools, menus, palettes, dockable windows, combo boxes, multi-items, and application and editor extensions. Add-ins are installed on a per-user basis and do not require administrative privileges for installation. Also, the add-ins can be easily shared between users and organizations via email, network share and public download.
  • Map automation using Python
    A new Python mapping module provides commands to interact with map documents (.mxd) and layer (.lyr) files. You can create Python scripts using these commands to open map documents and layers, query and alter contents, then print, export, or save the modified document. These commands are also very useful for implementing multiple document workflows, such as updating and fixing data source locations, creating reports based on layers, data sources, symbology, and so on. You can also combine several map documents to output a map book or atlas to the printer or a .pdf file.
  • Asynchronous execution of geoprocessing tools
    Since ArcGIS 9.2, developers have been able to run geoprocessing jobs (tools or models) using Geoprocessor.Execute method and the progress of the application will be stalled during the execution. However, at 10, the newly introduced Geoprocessor.ExecuteAsync() method can be used to asynchronously execute geoprocessing jobs—which means the application can progress and respond to user interaction, while a geoprocessing job is being executed. You can also run more than one geoprocessing job in an application asynchronously at 10.   
  • Basemap Layers for improved Map Navigation and Display
    A Basemap Layer is a special type of group layer for storing reference layers used for visualization or navigation purposes (eg. aerial imagery, streets, land parcels etc). The Basemap Layer is drawn using optimized display logic and provides a continuous display that makes it easy to navigate around a map. You can create a Basemap Layer programmatically using BasemapLayer class. A Basemap Layer can be added/ removed to a map (mxd document) like any other layer. 
  • Visualizing Spatial Datasets in ArcGIS
    ArcGIS 10 introduces query classes and query cursors that provide direct read-only access to datasets in spatial databases (for example, SQL Server 2008). Query classes implement the ITable interface and (in most cases) the IFeatureClass interface, and can be consumed by client applications much like a geodatabase dataset. Query classes with geometry fields can be added to any map document as a feature layer. A query layer behaves like any other layer and can be saved/shared as a layer file (.lyr) or can be served as an input to Geoprocessing models and tools for advanced analysis. 
  • Visualizing Time in ArcGIS
    ArcGIS 10 supports Temporal Visualization.  Features Layers, Graphic Layers, and many more can now be configured to render based on time attributes.  Many of the layers can use existing time-related data that is properly formatted.  Multiple layers can participate in time view at once.  ArcGIS provides a time control UI element, but the map can also be controlled programmatically.
  • ArcMap Editing Enhancements
    • User Interface: The editing environment in ArcGIS 10 desktop has been redesigned to provide a more simplified and streamlined workflow for users. The edit task, edit target and sketch tool workflow has been supplemented by the introduction of templates, edit tools, construction tools, and shape constructors.  The majority of changes and additions within the editor assembly support these user experience changes. 
    • Templates: Feature templates are a central concept in the editing environment in ArcGIS. Creating features using the editor relies on the use of feature templates. Feature templates provide an easy way to simplify and streamline the creation of features using the editor. Because a number of properties required to set up the editing environment and attribute the feature are predefined, the user can easily select a template, and a number of steps are performed automatically, making the user's task much simpler. 
    • Snapping: ArcGIS 10 introduces a new snapping environment that can be used by both ArcMap and ArcGIS Engine developers. The new snapping environment allows you to enable snapping in all your custom tools and not just those for use within the editor. The snapping environment is accessed as an extension in ArcMap and ArcGIS Engine from the esriControls assembly. 
    • TOC Customizations: The Table of Contents window and views have been re-architected for 10. Table of contents views such as display and source now appear as icons on the Table of Contents toolbar rather than tabs, as in previous versions. The Table of Contents window itself is now also part of the dockable window framework allowing it to slide, pin, and dock with other windows within ArcGIS. Custom table of contents views can be created by implementing the IContentsView3 interface which exposes two additional properties including the bitmap for the icon and a tooltip string. Existing custom views should only be migrated to the new TOC framework if they directly manipulate or are associated with the layers on the map. If you were previously using the TOC framework to host custom views for their docking capability, you should consider creating a proper dockable window instead. To migrate existing custom views to the new framework you need to implement the new IContentsView3 interface in your class and update the Bitmap and ToolTip methods. 
  • Display Expressions for Complex MapTips
    A Display Field is used to identify a feature when using the Identify window or to provide text for maptips. At 10, you can customize the text string of maptips by creating a display expression using IDisplayExpressionProperties interface. Using Display Expressions, you can concatenate or modify the attribute values of one or more fields, or include additional text strings to create more informational display. It can also contain Visual Basic script or JScript to add logic and text processing for your complex maptip.
  • Attribute Driven Symbology
    At ArcGIS 10, you can define the symbols in your layer based on its attribute value.
    • Rotating point features - The existing rotation renderer has been improved by providing support for applying rotation to point features based on a rotation value specified in an attribute field or using an expression. Also, you can rotate points randomly within a 0 - 360 degree range. A new interface IRotationRenderer2 provides methods for rotating points in map as well in 3D views such as scene and globe. In scene and globe, rotation is supported about the X, Y and Z axes. However, in map the rotation is supported in the 2D plane only.
    • Size of point features - A new size renderer interface now allows you to size point features based on a size value specified in an attribute field or using an expression. Also, you can size points randomly within a range. A new interface ISizeRenderer provides methods for sizing points in map as well in 3D views such as scene and globe.
  • Improved Printing Support
    The 10 release offers a new and simpler way to print and export maps.  A new PrintandExport class is added to ESRI.ArcGIS.Carto library to simplify printing and exporting of maps.
  • PNG and alpha-blending bitmap support for icons
ArcGIS 10 supports new higher quality icons, which make use of alpha-blending bitmaps and PNG image formats. All these icons are also available to developers when you install the ArcObjects Software Development Kit (SDK). We encourage the developers to take advantage of these icons for developing commands and tools for ArcGIS Desktop applications.

Key enhancements to existing libraries

A number of libraries have been updated with new interfaces and classes at 10. The following sections provide an overview of the key enhancements.

Desktop Application Framework Enhancements

  • Two new interfaces have been added to provide support for DockableWindow enhancements.
  • At 10, IToolPalette interface is introduced to simplify ToolPalette implementation and you don’t have to roll your own using IToolControl interface.

Geodatabase enhancements

  • The workspace editing event model has been extended to include a new interface, IWorkspaceEditEvents2. This exposes an event—OnBeginStopEditing—that is triggered when client code calls IWorkspaceEdit.StopEditing and allows custom behavior to occur before the edit session has been stopped. This is in contrast to IWorkspaceEditEvents.OnStopEditing, which is triggered after the edit session has already been stopped.
  • IQueryDef2 has been added to QueryDefs to allow for support of postfix clauses, such as ORDER BY and GROUP BY, through the PostfixClause property; prefix clauses, such as DISTINCT, through the PrefixClause property; and recycling cursors, through the Evaluate2 method. The new IQueryFilterDefinition2 interface has been added to query filters to support prefix clauses.
  • Several triangulated irregular network (TIN) related interfaces, such as ITinAdvanced3, ITinEdit2, ITinImporter, and ITinSurface3 for data management and analysis have been added. New terrain related interfaces, such as IDynamicSurface3, ITerrain2, ITerrainDataSource2, ITerrainEdit3, ITerrainEmbeddedDataSource2, and ITerrainFieldStatistics for data management and analysis have been added.

Raster enhancements

10 raster enhancement introduces classes to manage a large collection of images and provide dynamic image processing capabilities:
  • A FunctionRasterDataset class is a special type of raster dataset that encapsulates a RasterFunction (a class that describes raster operations) and a RasterFunctionArguments (a class that describes the required arguments for the operations) together. When it is accessed, the FunctionRasterDataset creates an output raster at run time by applying the raster function to the input data, which provides a mechanism for dynamic raster processing. A set of raster function classes  were added, including HillShadeFunction, ClipFunction, ConvolutionFunction, SlopeFunction, StretchFunction, ArithmeticFunction, PanSharpeningFunction, and so on.
  • MosaicDataset is a new raster data model at 10 that is used to manage a large collection of images with multiple formats and multiple sensors. It is supported in file geodatabases, personal geodatabases, and enterprise geodatabases. RasterType and a set of raster builder classes, such as LandsatBuilder, QuickBirdBuilder, IkonosBuilder, and so on have been developed to support various sensor types. A number of mosaic dataset operation parameter classes, such as  AddRastersParameters, BuildBoundaryParameters, and DefineOverviewParameters have been added to be used when authoring a mosaic dataset. A MosaicLayer class is added to the Carto assembly for displaying mosaic datasets.
  • Two new classes were added to support sensor camera models, LSRXform (local space rectangle transform) and FrameXform (standard frame camera transform).
  • Also, The following new interfaces have been added to the raster library:
    • IRasterColormap3—Used to read and write color map files (.clr).
    • IRawBlocks—Used to read and write pixel blocks based on storage blocks.

Geocoding enhancements

The following two new interfaces and co-class have been added to the geocoding assembly:
  • ISingleLineAddressInput—This interface will allow developers to determine if a locator supports single line geocoding. It will give developers the ability to get the SingleLineAddressField property, which specifies the field that the locator uses to geocode addresses in a single line format. It will also give developers the ability to get the DefaultInputFieldNames property to determine which field in an address table contains the full address for single line geocoding.
  • IGeocodingProperties2—This interface will allow developers to specify EndOffsetDistance as a double and specify EndOffsetDistanceUnits as esriUnits for locators that were built using ArcGIS 10 and above.
  • ESRIGen2AddressLocator—A locator (coclass) that uses the ESRI geocoding engine introduced in ArcGIS 10. This address locator supports single line input for geocoding.
  • IBatchGeocoding – This interface is implemented by every locator and will contain a subset of the methods that IAdvancedGeocoding contains.  IBatchGeocoding should be used instead of IAdvancedGeocoding when there is no need to access standardization methods or when a locator does not support standardization.  Developers will have access to RematchTable and MatchRecordSet

Display and DisplayUI enhancements

  • Display—ServerStyleGalleryItem supports a new interface, IStyleGalleryItem2. IStyleGalleryItem2 provides access to members that define items in the style gallery. Symbols and map elements are stored in the style gallery. Symbol or map element tables within a style have a new field, Tags, that contains references to the graphic properties of each symbol. Tags can be read from the item within the style gallery using Tags property from IStyleGalleryItem2.
  • DisplayUI—StyleItemEditor, a new coclass, supports the new IStyleItemEditor interface. IStyleItemEditor can be used to edit the properties of a style item, such as style, title, and so on.

Network Analyst enhancements

  • Location-Allocation solver—A new NA Solver, NALocationAllocationSolver, has been added to the Network Analyst assembly. The Location-Allocation solver is often used to locate a set of warehouses to minimize transportation costs or to locate a set of locations, such as fire stations, to provide the best coverage in a specified travel time, or to locate retail outlets to best capture market shares in presence of competitor locations using a Huff model.
  • Polygon and polyline barriers—To provide support for polygon and polyline barriers, NALocationRangesObject, NALocationRangesFeature, and NALocationRanges track the lists of junctions and edge ranges, with the associated geometry, that make up barriers. The new INALocator3 and INALocatorAgent3 have been added to use shapes and rows from feature classes to generate the location ranges associated with polygon and polyline barriers. INAClassDefinition2 interface has been added to the NAClassDefinition coclass, to help the developer find the location range field in the barrier NAClasses.
  • NetworkForwardStar—The network forward star has added the INetworkForwardStarEx interface to support the new barrier types (polygon, polyline, and point barriers that do not block the whole edge). INetworkForwardStarEx also centralizes the setup and querying used for network traversal that was previously spread across the INetworkForwardStar and INetworkForwardStarSetup interfaces.
  • Network dataset—The DENetworkDataset coclass has a new IDENetworkDataset2 interface that allows you to specify new properties added to the network dataset at 10, such as the elevation connectivity model and traffic data. There is a new NetworkEdgeTrafficEvaluator coclass that allows a network attribute to return travel time values that vary based on the time of day. The NetworkAttribute object has a new property that indicates whether the attribute is time aware and the network elements have new properties that allow you to query attribute values for a specific time of day. This might also be of interest to developers also using NetworkForwardStar.
  • Locating—Sometimes, when locating analysis objects, it is important to exclude elements that are restricted due to network attributes or barriers. CacheRestrictedElements and ExcludeRestrictedElements have been added to INALocator3 to restrict the NALocator location queries from returning network locations that fall on restricted network elements.

Deprecation and Removal Notice

The following section provides a list of functionality that has been deprecated or removed at 10. Please act now to remove any dependencies you may have on this functionality.
  • Developing macros with VBA - Deprecated 
    Visual Basic for Applications (VBA) for ArcMap and ArcCatalog is deprecated from version 10 onwards. VBA will not be installed with ArcGIS Desktop 10. To continue to use existing VBA macros for ArcMap and ArcCatalog at 10, a VBA license file must be requested from ESRI. However, ESRI strongly recommends that no further development occur on this platform. Beyond ArcGIS 10, ESRI will no longer be able to support VBA as a development platform. Users who have custom functionality built using VBA should actively plan strategies to rewrite their applications using a supported development language such as Python, VB.NET, or C# so their applications continue to be operational and supported in future releases of ArcGIS.  Please refer topic Migrating VBA customizations to ArcGIS 10.
  • Visual Basic 6.0 applications support- Removed
    Support for Visual Basic 6.0 applications was deprecated at 9.3 and removed at 10. ArcGIS customizations created in Visual Basic 6.0 cannot be registered and used with to ArcGIS 10 in a supported manner. 
  • ArcWeb Library- Removed
    The ArcWeb library contains objects used for accessing ArcWeb Services. However, ESRI no longer offers the ArcWeb Services product line and the ArcWeb library and all its classes, interfaces, and members have been removed. Any application that references ArcWeb Library cannot be migrated to 10, until and unless the references are removed.
  • DataSourcesSMUUI Library- Removed
    The DataSourcesSMUUI library contains the object for the Street Map USA extension (StreetMapExtension). This library was not extended by developers and all its classes, interfaces, and members have been removed. Any application that references DataSourcesSMUUI library cannot be migrated to 10, unless the references are removed.