How To: Create a new graticule using VBA and ArcObjects. Summary. This article shows how to create a new graticule and set its properties in ArcMap. You might ask this after installing ArcGIS With the release of ArcMap 10, Visual Basic for Applications (VBA) is on the way out. As the online help article. Customizing and developing with ArcGIS > Writing macros using VBA the ArcGIS Desktop Developer Guide, or from Exploring ArcObjects.

Author: Mijora Mazutilar
Country: Togo
Language: English (Spanish)
Genre: Love
Published (Last): 8 September 2013
Pages: 108
PDF File Size: 10.63 Mb
ePub File Size: 18.78 Mb
ISBN: 185-2-47781-164-8
Downloads: 41565
Price: Free* [*Free Regsitration Required]
Uploader: Tygomuro

This is easy enough to fix. That’s it for converting the code. Another way demonstrates one of the benefits of using the Visual Studio environment.

However, as demonstrated in the next section, the code is reusable and easily upgraded. Drag arcbjects My Form Button from Commands and drop it on any toolbar. Side-by-side view of VBA code and. This is easily fixed by adding import statements at the top of the code. NET, to set the text to the label, the property is called Text. The Esri arcobjectz help is very useful. Go to the Customize menu and pick Customize Mode.


How To: Create a new graticule using VBA and ArcObjects

It contains counties and states for the entire United States. Migrating VB6 to VB. Because this article is intended to demonstrate the ease of converting VBA code to.

When the code is pasted, several errors will show up. This will arconjects the selected county information and display it on the form. Click the button to show the county form that was just dragged to the toolbar. Right-click the form created in Visual Studio and pick View Code. Most of these will go away once the right references are added. First wizard screen encountered when creating an add-in.

It must be manually re-created. This opens the code for the button. This is where the work is done in the VBA sample, and this code needs to be copied and converted.

When all errors are fixed, Visual Studio displays the warning error “‘pFCursor’ is passed before it arcobjecs assigned. This added a command button to the project.

After changing the labels from caption to text, only va error remains. However, note that when pasting the code, Visual Studio did convert some code automatically. Paste the subroutine in the code behind.


The add-in model has many more options. In ArcMap, select a county on the map. An error is triggered by ThisDocument.

New to ArcMap VBA | GeoNet

In this example, open the included file called Form1. Search the online help for the article “Walkthrough: An easy way to do this is to export the form to be upgraded out of the VBA editor and open the exported arcobjedts with the.

Click the Close button to close the County Info dialog box. At the very top of the code for the form, above the public class, add three import statements Figure 4. When the add-in project was created, the Button checkbox was checked.