Creating a custom ArcMap class library in VB.Net

3836
2
07-22-2011 10:11 AM
GarySchells
New Contributor III
Hello,

I'm new to programming in  the .Net environment.  I am trying to create a custom ArcMap application that will allow users to automate a mailing labels task.  I've got something started in VB.Net.  I'm trying to understand some basics.  I come from the VBA environment.  My questions are"

1.  Is there a minimal number of modules required to create the application?  I have several tabs with .vb on the end that have been created.  I understand the "desighn" tab with my form and tools on it.  There is also a clsMain.vb that appears to have the code to "hooK' my application to ArcMap

2.  Is it similar to VBA in that I can design my form and tools and then double click the respective  tools to add the code?

I appreciate any feedback folks can provide.  I'm looking for a solid understanding of the basic requirements for ArcMap custom class creation in .Net.

thanks for any input
0 Kudos
2 Replies
YaminiManickam
New Contributor III
Hi!

Here is a good starting point to create applications for ArcGIS using .NET:

Extending ArcObjects - http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Extending_ArcObjects/00...

Creating commands and tools - http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Creating_commands_and_t...

Create a command by inheriting from BaseCommand - http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Walkthrough_Create_a_co...

Customizing ArcGIS Desktop using .NET is different from VBA in so many ways. Going through the above links will give you an idea.

To answer your questions:

1. Is there a minimal number of modules required to create the application? I have several tabs with .vb on the end that have been created. I understand the "desighn" tab with my form and tools on it. There is also a clsMain.vb that appears to have the code to "hooK' my application to ArcMap

Using the ArcGIS templates in Visual Studio will take care of the basic structure of the application. My suggestion is to follow the steps in the walkthrough in link 3 to get an idea.

2. Is it similar to VBA in that I can design my form and tools and then double click the respective tools to add the code?

As far as forms and tools are considered, yes, you should be able to double click on the tools to add code for the on click event.

I hope this helps.
0 Kudos
YaminiManickam
New Contributor III
An alternative is to build add-ins which are new in ArcGIS 10. For more information, please see:

Building add-ins for ArcGIS Desktop - http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Building_add_ins_for_Ar...

FYI, the add-in framework does not support every extensibility point defined by ArcGIS; for example, you cannot write a custom renderer, a custom workspace, or a custom feature as an add-in. You will need to use the classic COM extensibility approach(please see links provided in the previous post)if your solution includes component types that are unsupported in the add-in framework. Additionally, since the sharing of add-ins does not involve a registration step, do not use add-in based solutions that rely on external dependencies�??such as libraries, assemblies, and services�??that require registration or administrative intervention.
0 Kudos