Tag: C#

Esri will be participating at Xamarin Evolve 2016!

The Evolve conference hosted by Xamarin, is a premier cross-platform mobile event where 1,500 developers, industry leaders and Xamarin experts converge to define the future of apps. This year Esri is a silver sponsor for the event and will be participating in activities at Evolve16 in Orlando, Florida, April 24-28.

Esri will be showcasing opportunities for Xamarin developers, including leveraging ArcGIS technology that integrates seamlessly with the Xamarin platform.

Rex Hansen, ArcGIS Runtime product manager, and Rich Zwaap, lead software developer for the ArcGIS Runtime SDK for Xamarin, will be giving a technical presentation on “Building Cross-Platform Mapping Apps with ArcGIS Runtime” for developers who need to build mapping apps for iOS, Android, and Windows. He’ll talk about what you need to get started, demonstrate how to add ArcGIS functionality to mobile apps, and touch on how you can share .NET code across iOS, Android and Windows platforms.

Through the Xamarin and Esri technology partnership, we are looking forward to showing the Xamarin developer community how they can integrate mapping and geospatial technology into the apps they create.

Posted in App Developers, Developer, Mobile | Tagged , , , , , , , , , , | Leave a comment

ArcGIS Runtime SDK for Xamarin Quartz Tech Preview is now available!

We are excited to announce the Quartz Tech Preview of ArcGIS Runtime SDK for Xamarin!  This SDK enables .NET developers to build immersive, native mapping applications for Android and iOS devices using C#.  It includes three APIs: Xamarin.Android and Xamarin.iOS for apps that need access to native functionality, and Xamarin.Forms to create shared UI layouts across Android and iOS.  All are built on the same ArcGIS Runtime .NET API so they share a common design which encourages sharing code across application platforms.

Here is what you can expect to do in the Quartz Tech Preview of ArcGIS Runtime SDK for Xamarin:

  • Open, edit, and author web maps from ArcGIS Online and Portal for ArcGIS
  • Open ArcGIS mobile map packages containing maps, layers, locators, and networks
  • Display layers that use ArcGIS services (tiled and dynamic map image layers, vector tiled layers, feature layers)
  • Edit feature layers online and offline using geodatabase feature tables and the geodatabase sync task
  • Work with anonymous and secured portals

The Tech Preview is open to the public.  To learn how to get started, go to the ArcGIS for Developers web site and join the Tech Preview. 

Enjoy!

Posted in App Developers, Developer, Mobile | Tagged , , , , , , | 11 Comments

ArcGIS Runtime SDK 10.2.5 for WPF is now available!

The 10.2.5 release of ArcGIS Runtime SDK for WPF is now available to download from ArcGIS for Developers. This release follows the 10.2.3 release in May 2014 and addresses at least 50 bugs you asked us to fix, and a few more we found as well! We also found time to add a few minor enhancements you asked for:

  • Visual Studio 2013 Community Edition is now a supported IDE.
  • The gdbVersion on RelationshipParameter Class is now supported.
  • New DrawMode.ScreenAlignedRectangle enumeration type was added (Note: DrawMode.Rectangle is map-aligned).
  • Support for feature collection items by reference in WebMaps.
  • Exposed Symbol properties on Editor, TemplatePicker and EditorWidget.
  • Support for WMTS multidimensional services.

You can read the full list of enhancements, issues addressed and known limitations in the release notes.

Note that version 10.2.5 marks the last planned release of the ArcGIS Runtime SDK for WPF. Technical support will continue to be available through June of 2016. Moving forward, we recommend you explore WPF solutions based on the ArcGIS Runtime SDK for .NET. For information on transitioning to the new ArcGIS Runtime SDK for .NET please read this blog post.

 

Posted in App Developers, Developer, Uncategorized | Tagged , , , , , , | Leave a comment

The ArcGIS Runtime SDK for Qt 10.2 beta is now available!

Esri is pleased to announce the beta release of the ArcGIS Runtime SDK for Qt.

ArcGIS Runtime SDK for Qt is designed to help C++ developers use the Digia Qt framework to create highly functional GIS applications that use local services, yet the applications can have a small footprint. Local services allow for disconnected work in the field; an ArcGIS Server connection is not required.

Continue reading

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

Implementing a feature template dialog box in your code

In ArcGIS 10, feature templates define all the information required to create a feature, such as the target layer and the attributes the new feature will receive. Most of the time, you interact with feature templates on the Create Features window. However, some editing operations present a dialog box containing templates that you can choose for the output for that particular feature creation workflow. For example, the Select Feature Template dialog box used with the Editor menu > Buffer command allows you to set the feature template that will be used to create the new buffer feature. The list of templates is filtered to show only editable and visible polygon or line layers in the map; feature templates for other templates are hidden and cannot be used for the buffer output.

If you are developing a custom command or tool that requires the user to specify a feature template for the output of your workflow, you have two options for working with or presenting feature templates in the map. You can require the user to select a template from the Create Features window or you can implement a feature template dialog box that works similar to the Buffer command. Often, implementing your own feature template dialog box is the better option, as you can ensure the user has specified a template that meets the criteria of your customization. For example, you may only want the user to choose from templates from certain layers or those that are of a particular geometry type.

If you decide to create your own template dialog box for a customization, you can start by downloading a sample that Esri has created and shared in the Editing Labs group on ArcGIS.com. This sample is a Visual Studio 2010 project written in C# that creates an add-in containing simple dialog boxes to display templates. The sample was modeled after the template dialog box from the Buffer command and contains the same controls and considerations for displaying feature templates. You can use some or all of the functionality from this sample for your own customization. It is important to note that the dialog box can only display existing templates; you must create, delete, and manage templates for layers as usual through the Organize Feature Templates window.

Using the Template Dialog Sample command
The sample creates an add-in command that provides a similar chain of dialog boxes as Buffer: clicking the command opens a dialog box containing a button that opens another dialog box with a list of feature templates. The command is called Template Dialog Sample, which is TemplateAppButtton.cs in the Visual Studio project. To explore the sample’s functionality in ArcMap, compile the project or install the add-in that accompanies the download. Then, drag the Template Dialog Sample command from the Customize dialog box > Commands tab > Editing Labs category and place the button onto any toolbar. The command is only enabled when you are in an edit session.

Click the Template Dialog Sample button on the toolbar to which you added it to display the template application form (TemplateAppForm.cs). Click the Template button on the Template App Form dialog box to open the Template Picker Form (TemplatePickerForm.cs). Similar to the Select Feature Template dialog box opened from the Buffer command’s dialog box, the Template Picker Form allows you to choose a template and search for templates by name, tag, and layer.

In this sample, the Template Picker Form displays feature templates from all visible point, line, and polygon layers in the current editing workspace. If you want to enable filtering by geometry type, for example, you can modify the sample code through an enumeration in TemplateAppForm.cs when calling the TemplatePickerForm.

Most of the internal work in the sample occurs in the TemplatePickerForm class. This class contains a Visual Studio ListView control to display the templates as ListViewItems arranged into ListViewGroups that represent the layers. Selecting a template sets the _currentTemplate variable back on the add-in button, which can be used to set the current Editor template target on IEditor3.CurrentTemplate. The template can then be used to help you create new features as described in the Working with templates section in the Using feature templates help topic.

Content provided by Sean (Editing Team)

Posted in Developer, Editing | Tagged , , , , , , , , , | Comments Off

Customizing the editing environment: Changing feature template properties

Feature templates provide an easy way to streamline the creation of features while editing. Choosing a feature template determines which layer the feature will be created in, the attributes the new feature will have, and the default construction tool that will be used to create the new feature. These properties can be changed through the user interface or developer customizations.

This post explains how an add-in can update a feature template property. I posted it to the Editing Labs group on ArcGIS.com so other users can install it. The add-in can be accessed directly at http://esriurl.com/2066.

Setting the default feature construction tool
I am editing a layer of building features and need to create new footprint polygons.  My map contains feature templates with default attributes for each category of building I am capturing, such as Office, Residential, and Retail types. The Polygon tool is currently set as the default construction tool for all the templates. Because I am going to draw mostly rectangular features, I can set the default construction tool to Rectangle so that tool automatically becomes active on the Create Features window instead. Setting an appropriate default tool helps me avoid the extra click to switch from the Polygon tool to the Rectangle tool when drawing the rectangular buildings.

While I could change any feature template property manually on the Organize Feature Templates dialog box or the Template Properties dialog box, a simple add-in customization is an easy way to do it quickly for multiple feature templates at once. This add-in updates the default construction tool for all feature templates in a layer.

 

Writing the add-in
I can create the add-in within Visual Studio as an ArcMap button add-in. I’ll need to reference ESRI.ArcGIS.Carto and ESRI.ArcGIS.Editor, in addition to the default ESRI add-in references.
The full code for the add-in is as follows:

 
public class
SetTemplateTool : ESRI.ArcGIS.Desktop.AddIns.Button

  {

   
IEditor3 m_editor;

 

   
public SetTemplateTool()

    {

     
m_editor = ArcMap.Application.FindExtensionByName(“esriEditor.Editor”)
as
IEditor3;

    }

 

   
protected override
void OnClick()

    {

     
// get the selected template and current tool

     
IEditTemplate currentTemplate =
m_editor.CurrentTemplate;

     
ICommandItem currentTool =
ArcMap.Application.CurrentTool;

 

     
for (int
i = 0; i < m_editor.TemplateCount -1; i++)

     
{

       
IEditTemplate editTemplate =
m_editor.get_Template(i);

       
if (editTemplate.Layer.Name ==
currentTemplate.Layer.Name)

       
{

         
Guid g = new
Guid(currentTool.ID.Value.ToString());

         
editTemplate.Tool = g;

       
}

     
}

    }

   
protected override
void OnUpdate()

    {

     
this.Enabled = (m_editor.EditState ==
esriEditState.esriStateEditing);

    }

  }

The code simply loops through all the possible templates in the map during an edit session, identifies those that share the same layer as the currently selected template, and sets the default tool on those templates to the tool active in the Construction Tools portion of the Create Features window. It is important to note that this code only works within an edit session. I can still make programmatic changes to feature templates in a map outside of an edit session, but I must set them via the layer extension instead of the Editor object that already knows about all templates in the map.  

While this particular add-in only changes the default tool for a template, I could have also changed the default values for other template properties during this edit session via the properties and methods on IEditTemplate. For more information on working with feature templates, see Using feature templates in the ArcGIS 10 ArcObjects .NET SDK help.

Content provided by Sean Jones (Editing Team)

Posted in Developer, Editing | Tagged , , , , , , , , , , | Comments Off

A C++ API for the File Geodatabase

Esri’s development of a C++ API for the File Geodatabase is just about complete.   With this API you will be able to create, edit, and read File Geodatabases without using the ArcObjects API and without needing a license for ArcGIS.

This initial release will have some reasonable limitations, so for more information see this post from Jonathan Murphy in the Inside the Geodatabase blog.

 

 

Posted in Developer | Tagged , | Leave a comment

ESRI Releases the ArcGIS API Evaluator

If you haven’t heard, the ArcGIS Development Team has just released a new .NET utility called the ESRI API Evaluator.  This handy tool allows you to scan all of your ArcGIS .NET code and generate a complete set of API usage statistics.  This will reveal the DLL dependencies, version information and the number of calls made to all ESRI assemblies, interfaces and members. 

Help improve the product
One of the most important features of this tool is that it allows you to send your API usage information directly to the ArcGIS Development Team.  Once received, this information will be used to:

1.    Better understand the APIs that our customers are using (most popular).
2.    Make improvements to focused areas of the SDK (documentation and samples).
3.    Make decisions for future API development projects.

API Evaluator Scenarios
Scenario I – Help improve the SDK
You have been working on a number of ArcGIS projects and have had difficulty implementing various parts of the SDK.  Use the API Evaluator to let ESRI know what areas of the API are most important to you by uploading the usage statistics without actually sending us the code!

Scenario II – Improve your code
You have been working on an agile development project with a team of developers.  You would like to discover which parts of the API have been used the most by the team and if code reuse has been maximized.  Use the API Evaluator to determine the number of calls to all interfaces, methods and properties in the .NET assemblies and look for areas of improvement.

Scenario III – Deployment
You would like to determine the .NET Framework version, and ArcGIS license and extension requirements for an application.  Use this information to help determine the software and licensing requirements for deployment systems.
 
It’s easy to use!

Step 1.  Start the tool and run a new scan.

Step 2.  Select the folder(s) you wish to scan.    
 
NOTE:  If you are scanning a Visual Studio 2005/2008 web application, build and publish the website to generate the precompiled assemblies first.

 

Step 3.  Optionally, supply your contact information if you plan to upload your scan to ESRI. 


 
Step 4 – Confirm your selections.

 

Step 5 – Review the results.

Step 6 – Upload results to ESRI. Simply select the “Upload Scan” menu.

A few reasons to give it a try
I’m sure you can think of many different uses for this tool, but in general, you can use this tool to: 

1.    Determine the general API usage for larger or unknown code samples.
2.    Determine the licensing required to run an application.
3.    Locate redundant code sections and make improvements.
4.    Detect library dependencies to help with deployment scenarios.
5.    Detect .NET version dependencies.
6.    And most importantly, help improve the product (see below).

More Information
Where can I download it?  You can download the tool from the ArcGIS Engine Code Gallery.
Where can I find more information? You can find the documentation on the ArcGIS Engine Resource Center online.

We want your feedback!

Although the “Upload Scan” functionality is 100% optional, we do appreciate all feedback from the developer community, so we hope you find this tool useful and you can spend a few minutes uploading the results back to ESRI. 

Let us know if you have any questions or feedback.

Thanks for your participation!
ArcGIS Development Team

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

VB6 to .NET Migration Series: Getting ready for the ArcGIS 9.4 release

At the 2008 ESRI International User Conference  we announced that ESRI would no longer support the development of Visual Basic 6.0 applications at the ArcGIS 9.4 release.   Well, it is true.  As we speak, the development team is in the process of removing the VB6 DLLs and dependencies throughout the system.  So what does this mean for VB6 developers that plan to release their software applications on ArcGIS 9.4?  Well here are some inside tips that will help you plan for the future.
 
 
 
Visual Basic 6.0 SDK and Runtime
1. The Visual Basic 6.0 SDK will not be delivered with any of the ArcGIS 9.4 products.  Developers will not have access to the VB 6 developer help files, tools, add-ins and utility applications. 
 
2. The Visual Basic 6.0 Runtime will no longer be installed with any of the ArcGIS 9.4 products.   Therefore, if you still plan to deploy VB applications, you will need to ensure the VB 6 runtime has been installed by another application or you will need to install it as part of your deployment solution. 
Can you still develop with VB6?
Compilation:  The ArcObjects Type Libraries (OLBs) will still be shipped and installed with ArcGIS 9.4. As a result, as long as you don’t mind not having the ArcObjects VB6 SDK or any development tools, technically speaking, if you have a Visual Basic 6.0 development platform, you can still reference libraries and compile your applications.
 
Compatibility:  As long as the VB6 runtime is in place, it is possible that your applications will just work on an ArcGIS 9.4 system.  But please remember, while we make every effort to maintain backward compatibility, it is still your responsibility as the developer to reference the type changes and ensure that all applications behave as expected.
 
Microsoft Support:  In February, Microsoft released a “it just works” support statement indicating that they will continue to support the VB6 runtime on Windows 2008 and Vista; however, it is important to note that the VB6 IDE has gone past the period of extended support.  So that is something you may want to consider this as well.
What about VBA?
The Visual Basic for Applications SDK will still be released with ArcGIS 9.4 to support VBA development inside of the ArcGIS Desktop applications.  So VBA developers do not need to migrate their applications to .NET.
 
Should you still be developing with VB6? 
The bottom line is that if you are planning to develop applications for ArcGIS 9.4 and beyond, we strongly encourage you to start moving your VB6 applications to C#, VB.NET or VC++.

 

Making the Leap
You can find a number of articles on MSDN about how to make the switch from VB6 to .NET.  If you are thinking of transitioning to Visual Basic .NET today, there’s also a good set of articles here to get you started.   You’ll find that most of the documentation refers to Visual Studio 2005, but most of it applies to 2008 as well.  That said, you’ll need to decide whether to move to Visual Studio 2005 or 2008.  The current release of ArcGIS 9.3 supports development with both platforms.
 
Future blog series
To help you make the transition, be sure to stop by again or subscribe to view the upcoming VB6 to .NET Migration Series for ArcGIS developers.
 
 
 
 
Feel free to share your comments, links and experience here as well.
 
Posted in Developer | Tagged , , , , , | 1 Comment