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: Zusida Faedal
Country: Belgium
Language: English (Spanish)
Genre: Life
Published (Last): 12 October 2015
Pages: 192
PDF File Size: 8.53 Mb
ePub File Size: 9.83 Mb
ISBN: 853-5-80819-662-5
Downloads: 82908
Price: Free* [*Free Regsitration Required]
Uploader: Nill

When the add-in project was created, the Button checkbox was checked.

ArcObjects SDK for VBA

This opens the County Info dialog box. You need to pick the option that best suits your application. Scroll down and pick the word Text. This is where the work is done in the VBA sample, and this code needs to be copied and converted. They are authored in. In ArcMap, select a county on the map. There is one last thing to do before the code is ready to use. After the project is built, the files are arcobjfcts as an add-in and automatically installed in ArcMap.

Go to the Customize menu and pick Customize Mode.


ArcGIS Desktop Help – Sample VBA code

Drag the My Form Button from Commands and drop it on any toolbar. This article as a PDF. Not much has changed in the conversion between VBA and the add-in. That’s it for converting the code. This is really the only major error in converting the code. However, as demonstrated in the next section, the code is reusable and easily upgraded.

It must be manually re-created. At the very top of the code for ardobjects form, above the public class, add three import statements Figure 4. The VBA sample for this exercise is a simple form that reads the selected county on the map and displays its information on the form.

The Add-In Manager dialog box. Arcobkects the Customize dialog box, click the Commands tab Figure 7. This is easily fixed by adding import statements at the top of the code.

This will read the selected county information and display it on the form. When the code is pasted, several errors will show up.

How To: Create a new graticule using VBA and ArcObjects

You might ask arcbojects after installing ArcGIS If the ArcGIS templates do not show up when creating a new project, make sure you have. It contains counties and states for the entire United States. Paste the subroutine in the code behind. Most of these will go away once the right references are added. Just adding the references won’t fix the problems because the code that was copied worked in VBA because the VBA editor understood the shorter names arcobjecrs ArcObjects.

  BS 7273-4 PDF

An easy way to do this is to export the form to be upgraded out of the VBA editor and open the exported file with the. Code view with errors and import statements. For more information on these topics, see the online help for ArcObjects for. This added a command button to the project. NET, to set the text to the label, the property is called Text. Copy the subroutine and paste it into the newly created form in the add-in project.

The Esri online help is very useful. Go to the error lblCountyName. To set the text to the labels in VBA, the property is called Caption. In this example, open the included file called Form1. He can be contacted at cgallant ljbinc.