Tag: .NET

Moving to Add-ins (Recycling VBA)

In the Spring edition of ArcUser there is a nice article by Craig Gallant (LJB Inc) on converting existing projects to ArcGIS Add-ins.

Here how’s the article starts…

You might ask this after installing ArcGIS 10. With the release of ArcMap 10, Visual Basic for Applications (VBA) is on the way out. As the online help article “Migrating VBA customizations to ArcGIS 10″ explains, “VBA no longer provides the best toolset for customizing ArcGIS and is not included in the default installation.”

At ArcGIS 10, there are two new ways to customize in ArcGIS 10: Python and the new ArcGIS Desktop Add-in. [Add-ins are a new way to customize and extend ArcGIS 10. They are authored in .NET or Java and Extensible Markup Language (XML). They provide a declaratively based framework for creating a collection of customizations that can be conveniently packaged in a single compressed file that is easily shared. Add-ins do not require installation programs or Component Object Model (COM) registration.] Both options have advantages and disadvantages. You need to pick the option that best suits your application. This article shows how, with a little refactoring, existing VBA code can quickly be converted to an ArcGIS Desktop Add-in.

for more see ArcUser Online


Posted in Developer | Tagged , , , , , , , , , , , | Leave a comment

Visual Studio Support

The official Deprecation Plan for ArcGIS 10.0 and 10.1 document has been updated and there is a new announcement I want all Desktop and Engine developers to be aware of.

Esri will only support Visual Studio 2010 for ArcObjects .NET development at ArcGIS 10.1

There will not be a ArcObjects SDK for .NET and Visual Studio 2008. Hopefully this won’t be an issue for any .NET developers out there.  ArcGIS 10.0 today supports both 2008 and 2010 but at 10.1 we’ll only be able to support Visual Studio 2010.


Posted in Developer | Tagged , , , , , , , , | 11 Comments

Developer help expanded for .NET server object extensions

Some of you have heard of Server object extensions (SOEs) and taken advantage of them in your work. SOEs allow you to use ArcObjects to expand the base functionality of ArcGIS Server services. SOEs are for experienced developers and require knowledge of various development platforms. However, developing an SOE just got a bit easier thanks to a developer help update to the Server object extensions book that became available yesterday.

The update significantly expands the explanation of what an SOE is and when you need one. It adds a book on  developing SOEs as REST Web services. It also contains more direction on how to register SOEs with ArcGIS Server and guidelines to follow when developing SOE property pages.

The new help is conceptual with code snippets. The existing walkthroughs and downloadable samples are still available, and as part of our expansion of this section we hope to add more samples in the future.

Contributed by Sterling Quinn of the ArcGIS Server development team

Posted in Services | Tagged , , , | 1 Comment

Developing Add-Ins for ArcGIS Desktop 10

The next live training seminar on ArcGIS 10 is this Thursday. This Seminar will introduce you to the new way to customize and extend
ArcGIS Desktop using the Microsoft .NET Framework. ArcGIS Desktop 10
introduces the new Add-In framework to easily build and share solutions.

This seminar is for ArcGIS Desktop users who want to learn how to create or share ArcGIS Desktop add-ins

Thursday, September 30, 2010
9:00 a.m., 11:00 a.m., & 3:00 p.m. Pacific Time (US & Canada)
12:00 p.m., 2:00 p.m., & 6:00 p.m. Eastern Time (US & Canada)
4:00 p.m., 6:00 p.m., & 10:00 p.m. UTC/GMT 

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

ArcGIS Mobile 10 Code Samples

The Mobile Development Team has created a new group inside of ArcGIS.com to host code samples that you can download and use. The group is called ArcGIS Mobile Code Samples and with our initial upload it includes the following samples:

  • Customized Data Collection – this is a custom task that extends the data collection workflow for the Windows Mobile application. Using this sample you can treat the collection of the shape of a feature as if it is another attribute you want to collect.
  • Picasa – this sample illustrates how you can use the core ArcGIS Mobile SDK and the Picasa API to capture and upload photos and videos.
  • Rangefinder – this sample augments the ArcGIS Mobile applications’ data collection workflow so that you can use a laser range finder to collect the location features.
  • Routing – using the ArcGIS Online routing service you can route to a GIS feature from your current location and get driving directions.
  • Waypoint Navigation – being able to navigate “as the crow flies” is a useful tool when working in the field. This sample illustrates how you can navigate to a feature from your current location using a bearing and distance.
  • Show XY – displays your current LAT/LONG position that is fed from the GPS receiver in your device on top of the map.
  • Save User ID – this sample illustrates how you can use your current user id (associated with the field crew task) to auto-populate an attribute value for a given field.

Please bookmark our group in ArcGIS.com and check back frequently as you will see many more samples coming soon.


Mobile Team

Posted in Mobile | Tagged , , , , , | Leave a comment

Using Visual Studio 2010 and .NET 4.0 with ArcGIS Explorer

The new release of ArcGIS Explorer (build 1500) SDK for the Microsoft .NET Framework adds support for Visual Studio 2010, including the free Visual C# and Visual Basic Express editions.

For ArcGIS Explorer development, you will use the multi-targeting (compiling for a specific version of the .NET framework) functionality in Visual Studio to target .NET Framework 3.5; this is the version supported for Explorer add-ins, and is required by the application and API.

Add-in projects created by the Visual Studio Tools for ArcGIS Explorer will target 3.5, regardless of the framework chosen in the New Project wizard.

Add-ins that target.NET Framework 4.0

One of the features introduced in Visual Studio 2010 is support for targeting the.NET Framework 4.0, which includes a new Common Language Runtime (CLR).

Add-ins which target framework 4.0 cannot be loaded by the CLR which Explorer uses by default, and so Esri does not support development with .NET 4.0 for ArcGIS Explorer. However, if you do need to make use of framework 4.0, it is possible to configure Explorer to load both 3.5 and 4.0 frameworks side by side.

First, you must make changes to the application configuration file of the ArcGIS Explorer application to force it to load with the CLR and Framework version 4.0; see Scenario 3 in this MSDN article http://msdn.microsoft.com/en-us/library/ee518876.aspx. This change is necessary because if framework 3.5 is loaded first, the application cannot then load framework 4.0. Next, change your add-in project to target framework 4.0, by setting the Target Framework in Project Properties.


Now compile your add-in and start ArcGIS Explorer; both framework 3.5 and 4.0 will now load side-by-side in the application.

Remember this is not a supported configuration; incompatibilities in between the frameworks and the Common Language Runtime (CLR) versions may cause errors, you should only attempt these steps if you intent to fully test and certify your add-in and support your users with this unofficial configuration.

You can read more about Version Compatibility in the .NET Framework in this MSDN article: http://msdn.microsoft.com/en-us/library/ff602939.aspx.

You can also refer to MSDN for full information about application configuration files and their contents, at http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx.

Upgrading existing 1200 add-in solutions from Visual Studio 2008 to 2010

You can open existing add-in solutions in Visual Studio 2010, which will trigger the integrated upgrade wizard to upgrade the solution (note that this is a one-way process, it cannot be opened in Visual Studio 2008 any longer).


If you upgrade a project created with ArcGIS Explorer 1500, you should find your add-in works with no manual changes required. Alternatively, you can create a new add-in from scratch in Visual Studio 2010 using the New Project templates there.

However, it’s more likely that an existing add-in project will have been created with 1200 – in this case, you may find the add-in fails to load in Explorer once upgraded to Visual Studio 2010, with a message indicating “This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.”

This is because the upgrade wizard does not deal correctly with project files that were created initially using ArcGIS Explorer 1200, resulting in an add-in that targets framework  4.0. As mentioned in the section above, add-ins targeting framework 4.0 cannot be loaded by the runtime which Explorer uses by default, and so the Add-Ins error handler prompts you to remove this add-in.

If you find this error from an upgraded add-in, and did not intend to target framework 4.0, you can correct it with a simple edit to the project file before you perform the upgrade; full details can be found in Knowledge Base article 38236.

(Shelly Gill, ArcGIS .NET API Product Engineer)


Posted in Uncategorized | Tagged , , | Leave a comment

Tips and Tricks for Using ArcObjects in Microsoft Visual Studio

This video
illustrates how to use some of the new Microsoft Visual Studio 2008
and 2010 integration features available with ArcGIS 10 such as project
templates, snippets, references, help documentation, and samples.

Special thanks to Katy from the SDK team for putting this together.



Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Presentation AddIn for ArcGIS Desktop 10

Recently, the Application Prototype Lab released a new version of the presentation tool as an Add-in for ArcGIS 10.  This Add-in is similar to the presentation capability recently added to ArcGIS Explorer.  The Add-in can be downloaded here from the new code gallery.

The Add-in was developed in C# for .NET 3.5 and utilizes the graphics capabilities of WPF.  Full source code is provided with the code gallery download.

For more information see this recent post on the the Application Prototype Lab blog

Posted in Uncategorized | Tagged , , , , , , | 1 Comment

Registering Custom Components with ArcGIS 10

To help with your migration to ArcGIS 10 check out this knowledge base article on how to register legacy ArcObjects components with ArcGIS 10.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

What's up with ComReleaser?

A while back we put up a post on Using the ComReleaser to manage the lifetime of cursors in .NET.

As an addendum to the helpful info and links in that post, I’d like to direct any interested parties to the forum post What’s up with ComReleaser? Is it really working? where there is a pretty good discussion going about cursors, the ComReleaser and how a ninja might approach memory management in general.

Our resident ninja, James MacKay, will be catching a boat next month to another life in Australia, so if you have questions for him now’s the time to ask.

Posted in Geodata | Tagged , , | Leave a comment