Tag: .NET

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.

Thanks,

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
tutorial
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

Add-ins for ArcGIS Desktop 10

ArcGIS 10 introduces several new and innovative features that make it easier for you to customize and extend the ArcGIS Desktop applications, including the new Desktop add-in model. The new add-in model provides you with a declaratively-based framework for creating a collection of customizations conveniently packaged within a single compressed file. Add-ins are easily shared between users as they do not require installation programs or Component Object Model (COM) registration; add-ins are added to a system by simply copying them to a well-known folder and removed by deleting them from this folder. Add-ins can also be shared between users within an organization using a centralized network share.

Add-ins are authored using .NET or Java along with Extensible Markup Language (XML). The XML describes the customizations, while the .NET or Java classes provide the custom behavior. The ArcObjects software development kit (SDK) includes an Add-Ins Wizard that integrates with development environments-such as Eclipse, Microsoft Visual Studio, and the free Express Editions of Visual Studio-to simplify development.

Add-in Types
ArcGIS Desktop applications support a fixed set of add-in types, including the most popular types used in the classic COM-based extensibility model introduced in previous versions of ArcGIS. The following add-in types are supported in the current release:

  • Buttons and tools
    Buttons and tools are simple controls that can appear on toolbars or—in the case of buttons—on menus.
  • Combo boxes
    A combo box provides a drop-down list of items and can optionally provide an editable input area.
  • Menus and context menus
    A menu presents a drop-down list of buttons, submenus, and multi-items. Menu items can come from built-in sources, add-in sources, or a combination of both. Menus are typically hosted on toolbars, but they may also appear independently as context (pop-up) menus and root menus.
  • Multi-items
    A multi-item is a dynamic collection of menu items created at run time. Multi-items are useful when the items on a menu cannot be determined prior to run time or the items need to be modified based on the state of the system.
  • Toolbars
    A toolbar can host buttons, tools, menus, tool palettes, and combo boxes. As with menus, controls that appear on toolbars can come from built-in sources, add-in sources, or a combination of both. Toolbars can be configured to automatically appear when initially added to an application to make their presence more obvious to users.
  • Tool palettes
    Tool palettes provide a compact way to group a related set of tools. The most recently used tool appears on the toolbar alongside a small drop-down button used to access other tools in the group. As with menus, tools that appear on tool palettes can come from built-in sources, add-in sources, or a combination of both.
  • Dockable windows
    Dockable windows are floating or docked windows that appear within the ArcGIS Desktop applications. You can populate dockable windows with any sort of content: charts, slide shows, video, mini-maps, or custom dialog boxes containing other controls—including ESRI controls. Add-in developers have considerable control over where the dockable window initially appears and whether it will be grouped with other dockable windows.
  • Application extensions
    Application extensions are used to coordinate activities between other components—such as buttons, tools and dockable windows—within a containing add-in. Application extensions are usually responsible for storing state associated with the add-in as a whole and are often used to listen for and respond to various events exposed by the host application. Application extensions can be configured to load when needed or automatically when their associated application is started; extensions can also be configured to appear in the standard ArcGIS extension dialog box.
  • Editor extensions
    Editor extensions allow you to customize your editing workflows by plugging directly into the editing framework. As opposed to application extensions, editor extension add-ins are loaded when the edit session starts (Editor>Start Editing). You can customize the behavior of your editing session (for example, listening for edit events) by creating editor extensions.
Managing Add-ins
Add-ins can be obtained from a variety of sources including Web-based repositories, via e-mail, or by browsing the file system or network. You can install an add-in by simply double-clicking an add-in file in Windows Explorer. When double-clicked, the ESRI supplied Add-In Installation Utility validates the add-in and copies it to the appropriate well-known folder. Users are given an opportunity to review the author, description, version, and digital signature information of the add-in before proceeding. This validation step ensures that: the file is copied to the appropriate location; name conflicts are handled; and guarantees that any existing version of the add-in file isn’t overwritten by an older version. This utility also works directly on e-mail attachments and Web page links. See the following screen shot:
 
Add-ins can also be installed using the Add from file button on the Customize dialog box available in all the ArcGIS Desktop applications. See the following screen shot:
You can access the Customize dialog box via the Customize menu. Add-ins installed using either the double-click or Add from file options are classified as local add-ins. Local add-ins reside within a special well-known/per-user folder on the local machine.
Though add-in files can be manually copied to a well-known folder without using the ESRI Add-In Utility, care must be taken to avoid file name collisions, version overwrites, and so forth. This approach is typically used when sharing add-ins on a network.
As with classic COM components, individual add-in types are accessible via the Customize dialog box. For example, a button defined in an add-in behaves no differently than a COM command, both are listed under their specified category on the Commands tab. From this location, either can be dragged onto any toolbar or menu.
The ArcGIS Desktop applications provide an Add-In Manager dialog box available from the Customize menu. The Add-Ins tab on this dialog box provides detailed information on every installed add-in currently available to the running application. Add-ins targeting ArcGlobe, for instance, will not appear inside ArcMap. See the following screen shot:
The Add-In Manager Options tab lets users add custom well-known add-in folders. The add-in framework will additionally search for add-ins within these custom folders each time the application is started. This option is particularly useful in scenarios where a central network location is used to share add-ins throughout an organization. Add-ins can be added, deleted, and updated in these locations without intervention on any of the client machines; updates will be automatically reflected on the clients when the relevant applications are next re-started. The Options tab can also be used to disable all add-in functionality. See the following screen shot:

From the Add-In Manager, users can also elect to uninstall a particular add-in. Uninstalling an add-in moves the selected add-in file to the system Recycle Bin where it can later be restored if necessary. The Uninstall button is only enabled for local add-ins. To uninstall an add-in originating from a custom add-in folder, simply delete the add-in from the share or remove the custom add-in folder using the Remove Folder button.

Building Add-ins
Add-ins are built using an integrated development environment (IDE), such as Visual Studio Express for .NET and Eclipse for Java, and simple wizards and templates are provided with the ArcObjects SDKs to automatically generate fully stubbed out add-in projects including the XML and class files. In addition, when these projects are built, they automatically generate an add-in file and copy it to a well-known folder. For the most part, the XML is authored by the wizards; however, if you do need to edit the XML by hand, the associated schema file makes edits easy as it provides IntelliSense and on-the-fly validation. To learn more about developing add-ins and using these wizards and templates, see Building custom UI elements using add-ins and How to migrate from COM components to add-ins.

 

Posted in Uncategorized | Tagged , , , , , , , , , , | 30 Comments

Planning your DevSummit: Desktop

The Planning your DevSummit series is aimed at helping you make the most of your time at the 2010 Developer Summit. We’re really excited by the technical sessions, user presentations, demo theaters and seminars we’ve got lined up for you and there is certainly a lot to take in. Hopefully we can help make planning your days at the DevSummit that little bit easier.

The Technical Sessions

Desktop and Engine developers have a lot to look forward to with the release of ArcGIS 10, and there are plenty of sessions that cover the new functionality. This post covers those sessions to help you decide which ones to attend. There’s also a Presummit Seminar about Python that’s worth checking out.


Day 0: Presummit Seminar

Python plays a greater role at ArcGIS 10, with new and extended functionality. Getting Started with Python in ArcGIS (8:30am) introduces the basics and takes you through to creating your own tools, highlighting the new features at ArcGIS 10.

 


Day 1

Developing .NET Applications for ArcGIS Engine (1:00pm) explores new features of Engine development at ArcGIS 10, covering a number of new components and touching on licensing. Some ArcObjects and .NET experience is required.

New at ArcGIS 10, Desktop Add-ins will be of great interest to anyone who’s had to deploy customizations to ArcMap. The Introduction to ArcGIS Desktop Add-ins (2:45pm) session discusses the add-in programming model and framework, coding patterns, distribution and debugging and is a must-see if you’re extending ArcMap.

 


Day 2

For Java developers, ArcGIS 10 also introduces Java Add-ins and Extending ArcGIS Desktop and Engine with Java (10:30am) uses real-world examples to show you how to create custom feature renderers and geoprocessing tools in addition to Desktop Add-ins.

Enhancing Your Applications with ArcGIS Online (1:00pm) is not strictly on the Desktop track, but covers consuming ArcGIS Online services and content, showing how they can be used in ArcGIS applications. Useful if you want to learn more about how to make good use of ArcGIS Online in your applications.

Once you’ve written great Desktop and Engine applications, you still need to have a system to deploy and manage them. Deploying Desktop and Engine Applications in .NET (2:45pm) will go into detail on best practices for deployment and distribution of Desktop and Engine applications, licensing, version compatibility, service packs and building setup programs. This session requires some experience with .NET and ArcObjects.

Again not strictly Desktop track sessions but nonetheless of potential interest to Desktop developers:

Both promise to be interesting, and if you’re thinking of making the switch to Web-based applications using one of our Web APIs then Redesigning Desktop Applications for the Web (4:30pm) will probably make most sense.

 


Day 3

If you’re interested in learning more about extending ArcGIS Explorer (which has its own SDK), Implementing ArcGIS Explorer (8:30am) is worth attending. If you’re mostly visualizing data, ArcGIS Explorer may provide all the functionality you need.

At the same time is Developer-to-Developer: The ESRI Development Process (8:30am) which will be useful and of interest to any developer.

A three-part session Developer-to-Developer: ArcGIS 10 Desktop Development Topics (10:15am) goes over 3 important aspects of enhancement introduced at ArcGIS 10: Display Performance, Geocoding, and migrating VBA/VB6 applications to .NET (ArcGIS 10 is the last release to support VBA and VB6).

Previous desktop sessions (Developing .NET Applications for ArcGIS Engine on Day 1 at 1:00pm and Developing .NET Applications for ArcGIS Engine Day 2 at 1:00pm) will have discussed Desktop and Engine specific licensing topics, but ESRI Product Licensing (10:15am) is a Q&A oriented panel discussion so if you have specific questions left this is your chance to put them to our team.

 


More Details

You can download the complete Desktop sessions overview as a PDF document to print out and bring with you to the DevSummit as a convenient reference.

In the run-up to the DevSummit we’ll be posting more of these guides to help you pick out the sessions you’ll likely want to attend, and we’ll also be discussing the User Presentations. These are the guides you can look forward to:

If you’ve got suggestions for what you’d like to see in these guides, let us know.

- Nick

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