ArcGIS Pro SDK Blog

cancel
Showing results for 
Search instead for 
Did you mean: 

Other Boards in This Place

Latest Activity

(67 Posts)
Esri Regular Contributor

We welcome your feedback!

Read more...

more
0 0 62
Esri Regular Contributor

Graphics Layer capabilities arrived with ArcGIS Pro 2.6, and along with it, an extensive Graphics Layer API for the ArcGIS Pro SDK

ArcGIS Pro’s graphics layers are containers for graphic elements – geometric shapes, lines, points, text, or pictures. They provide a way to include simple notations on a map or layout that highlight particular areas or label places.

The Graphics Layers community sample provides a great overview of how the graphics layer API's capabilities can be used in creating different tools.  Building on this community sample, the new Graphics Markup Tools sample add-in available on ArcGIS.com provides a demonstration of how the API's capabilities can support a map markup workflow for field inspections, with survey locations as graphic “markups”. 

The sample's tools allow the user to add and update the status of these markups easily.  The tools are generic and can be applied to several inspection workflows – COVID-19 tracing, Census taker home visits, local government senior services, etc.

The demo dataset uses the CDC Social Vulnerability Index 2018 - USA layer, and the workflow demos including one of the data points with the markup information.

Video walkthrough available on YouTube here.

ArcGIS Pro

more
0 0 263
Esri Regular Contributor

ArcGIS Pro 2.6 is now available, and included are exciting new capabilities for the ArcGIS Pro SDK for .NET.

Here are some of the highlights of the release with links to new documentation and resources.

Map Authoring API

Pro’s new Graphics Layers capability provides users the ability to make graphic and text notations on a map or layout that highlight particular areas or label places, without creating features.

At 2.6, developers can now create and manage graphics layers in ArcGIS Pro.  The SDK provides access to insert, update and delete graphic elements including text elements, as well as update their geometry and symbology.  Developers can also manage element selection, grouping, alignment, distribution and ordering.

You can learn more in the new ProConcepts Graphics Layers document, and get code snippets for many of the standard approaches for working with the graphics layer in the ProSnippets Graphics Layers doc.  There’s also a new community sample available for you to quickly get started.

The Graphics Layers sample with custom tools available on a new tab:

Editing API

Layer Snap Modes are a new editing capability at 2.6.  Developers can now provide improved snapping control by setting the target layer of interest, building additional accuracy and efficiency into custom editing workflows.

To help you get started, Layer Snap Modes are discussed in a new section in the ProConcepts Editing document, as well as a new community sample to try it out.

A custom snapping pane in the new Layer Snap Modes sample:  

Other API Enhancements and Updates

There’s also been updates to other Pro APIs and capabilities of the SDK at 2.6.

Developers can now configure add-ins to store custom application settings in Roaming User Profiles.  This allows a user to access their custom Pro settings from any machine on the user’s network.

Developers can test the pre-release Parcel Fabric API, first available at 2.5, for building of record-driven workflows with parcel-aware editing capabilities.  There are new methods for testing layer participation in parcel fabric and creating and clearing parcel records.  More information is available in the ProConcepts Parcel Fabric document and code snippets.

Also new at 2.6, the document, ProConcepts Asynchronous Programming in ArcGIS Pro is available.  It covers various asynchronous programming techniques for use with Pro add-in, and compliments introductory information available in the ProConcepts Framework document.

Check out all of the information resources on the SDK documentation site with all the concept and guide documents and links to the many community samples.

Finally, for a full listing of all the API changes, see the What’s New for Developers at 2.6 page in the Pro API reference.

Collaborate and Share your Feedback

As always, we invite you to send us your feedback and needs for the Pro SDK.  Let us know, find out more and collaborate with others here in the GeoNet Pro SDK Group.  The group allows developers an opportunity to ask technical questions and search for answers on existing threads, and provide feedback on the SDK.  We look forward to hearing about your new work with 2.6!

For more information on all the exciting updates in ArcGIS Pro 2.6, see the What’s New in ArcGIS Pro page, which also includes the video below with many highlights.  It can give you lots of new ideas for using and extending Pro 2.6.

ArcGIS Pro

more
1 0 118
Esri Regular Contributor

The next release of ArcGIS Pro 2.6 will soon arrive, and with it new updates to the ArcGIS Pro SDK for Microsoft .NET.  Here are some of the highlights you’ll see with the Pro SDK at 2.6:

Map Authoring:  Graphics Layer  Insert, update and delete map graphic elements including text. Update geometry and symbology. Manage element selection, grouping, alignment, distribution and ordering.

Below are a few screenshots of the SDK Team’s new Graphics Layers community sample that will be available with 2.6 which demonstrates the new classes and and techniques for working with graphics.

Creating and working with graphics using the sample’s custom ribbon tab:

Sample tools for creating graphic and text elements, selection and formatting:

Sample tools for updating symbology, order, and alignment:

Editing:  Enhancements to edit events and snapping to allow snapping to be set by layer.

Custom Settings:  Developers can store custom application settings for add-ins in Roaming User Profiles.

Other API Enhancements:  New classes and methods available in the Editing, Geodatabase, Framework, Geometry, and Mapping APIs.

As with each release, there will be new ProConcept and ProGuide documentation, with code samples and snippets to help you get up and running with the new SDK features.

Stay tuned for the Pro 2.6 release announcement in the coming weeks, when we’ll provide additional information on the updates with links to the new content.

We look forward to hearing from you as you begin to leverage these new 2.6 capabilities in your add-ins, and we invite your questions and feedback here in the Pro SDK Group.

ArcGIS Pro at Virtual UC 2020

User Conference 2020 is this week, July 13 – 16, and it offers plenty of great opportunities to learn about ArcGIS Pro.  You can find out about all the offerings in this ArcGIS Pro UC post as well as info on Developer offerings in this post.

For registered attendees, in addition to all the ArcGIS Pro technical sessions, plan to visit the ArcGIS Pro Area in the Esri Showcase where you can meet with ArcGIS Pro Team members and the Desktop SDK Team.  For info and updates on the Pro SDK, plan to virtually stop by the ArcGIS Pro SDK for .NET sub-topic kiosk with your questions and schedule a meeting with the team for a demo.

The Pro Team will be available in the Showcase through Wednesday to answer your questions, help you get started, provide demos and share more information about the latest ArcGIS Pro 2.6 updates.

Finally, for a great overview of all the powerful new capabilities coming with ArcGIS Pro 2.6, see the What’s New video below. We hope you have a great Virtual UC 2020!

ArcGIS Pro

more
0 0 401
Esri Contributor

After sometime back I got difficulty on reading aptx file information with ArcPro SDK, refer to this post.

Retrieval of Project/project template metadata 

Thank to Wolfgang Kaiser‌, I found out that aptx is actually a 7zip file, and no wonder I can't use build in Microsoft provided zipfile libraries.

And the there are a lot of 7zip extractor out there in nugget space but some are not working properly to extract that aptx file.

Among them, SevenZipExtractor, 7z.NET nugget libraries can extract that aptx file.

Below is the code snippet how we can achieve and extract aptx info.

Model class generated and modified from xml file

using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;

// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
public partial class ESRI_ItemInformation: INotifyPropertyChanged
{

private string nameField;

private string guidField;

private decimal versionField;

private object createdField;

private object modifiedField;

private object catalogpathField;

private string snippetField;

private object descriptionField;

private string summaryField;

private string titleField;

private string tagsField;

private string typeField;

private string[] typekeywordsField;

private string thumbnailField;

private object documentationField;

private object urlField;

private object spatialreferenceField;

private decimal minScaleField;

private decimal maxScaleField;

private object datalastModifiedTimeField;

private object accessinformationField;

private object licenseinfoField;

private string cultureField;

/// <remarks/>
public string name
{
get
{
return this.nameField;
}
set
{
this.nameField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string guid
{
get
{
return this.guidField;
}
set
{
this.guidField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public decimal version
{
get
{
return this.versionField;
}
set
{
this.versionField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object created
{
get
{
return this.createdField;
}
set
{
this.createdField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object modified
{
get
{
return this.modifiedField;
}
set
{
this.modifiedField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object catalogpath
{
get
{
return this.catalogpathField;
}
set
{
this.catalogpathField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string snippet
{
get
{
return this.snippetField;
}
set
{
this.snippetField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object description
{
get
{
return this.descriptionField;
}
set
{
this.descriptionField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string summary
{
get
{
return this.summaryField;
}
set
{
this.summaryField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string title
{
get
{
return this.titleField;
}
set
{
this.titleField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string tags
{
get
{
return this.tagsField;
}
set
{
this.tagsField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string type
{
get
{
return this.typeField;
}
set
{
this.typeField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
[System.Xml.Serialization.XmlArrayItemAttribute("typekeyword", IsNullable = false)]
public string[] typekeywords
{
get
{
return this.typekeywordsField;
}
set
{
this.typekeywordsField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public string thumbnail
{
get
{
return this.thumbnailField;
}
set
{
this.thumbnailField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object documentation
{
get
{
return this.documentationField;
}
set
{
this.documentationField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object url
{
get
{
return this.urlField;
}
set
{
this.urlField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object spatialreference
{
get
{
return this.spatialreferenceField;
}
set
{
this.spatialreferenceField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public decimal minScale
{
get
{
return this.minScaleField;
}
set
{
this.minScaleField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public decimal maxScale
{
get
{
return this.maxScaleField;
}
set
{
this.maxScaleField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object datalastModifiedTime
{
get
{
return this.datalastModifiedTimeField;
}
set
{
this.datalastModifiedTimeField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object accessinformation
{
get
{
return this.accessinformationField;
}
set
{
this.accessinformationField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
public object licenseinfo
{
get
{
return this.licenseinfoField;
}
set
{
this.licenseinfoField = value;
this.NotifyPropertyChanged();
}
}

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string Culture
{
get
{
return this.cultureField;
}
set
{
this.cultureField = value;
this.NotifyPropertyChanged();
}
}

public event PropertyChangedEventHandler PropertyChanged = delegate { };

private void NotifyPropertyChanged([CallerMemberName] string propName = "")
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}

Real fun part extract and load into object, later part you can freely play with object

For below sample, I am using NuGet Gallery | SevenZipExtractor 1.0.15 

ESRI_ItemInformation TemplateInfo ;

using (ArchiveFile archiveFile = new ArchiveFile(templatePath))
{
Entry itemInfoEntry = archiveFile.Entries.FirstOrDefault(x => x.FileName.Equals(@"esriinfo\iteminfo.xml", StringComparison.OrdinalIgnoreCase));
if (itemInfoEntry != null)
{
MemoryStream memoryStream = new MemoryStream();
itemInfoEntry.Extract(memoryStream);
memoryStream.Position = 0;

XmlSerializer serializer = new XmlSerializer(typeof(ESRI_ItemInformation));
TemplateInfo = (ESRI_ItemInformation)serializer.Deserialize(memoryStream);
}
}

more
1 0 63
Esri Regular Contributor

The GeoDev Webinar Series will be hosting a webinar on ArcGIS Pro SDK Extensibility Patterns on Thursday, July 2nd at 9 AM Pacific Time.  This will be introductory-level webinar and should be helpful for those looking for an overview of the SDK and the main patterns for extending Pro.

More information and registration at:   ArcGIS Pro SDK for .NET: Extensibility Patterns 

ArcGIS Pro

more
0 0 68
Esri Regular Contributor

Dev Summit technical sessions are now available online!

You can now view all the ArcGIS Pro SDK technical sessions from the 2020 Esri Developer Summit at the Esri Events Channel on YouTube.  A playlist of the SDK videos can be found here and also the individual session descriptions and links are found below.

The sessions are a great way to get introduced to ArcGIS Pro development and extensibility, and to get updates on the latest SDK information and development patterns.  In addition to the videos, the slides for the sessions will also be available on the Proceedings site in the coming weeks.

The Dev Summit was converted to an online virtual event due to the COVID-19 pandemic, and the plenary was hosted live online.

During this year’s plenary, Wolf Kaiser from the SDK Team gave an exciting demonstration of a Pro add-in using the Realtime Stream Layer API to capture transponder flight data for tour helicopters flying over the island of Kauai. Watch here as Wolf walks through the custom tools interacting with the 3D event data and scene, and then shows you how it’s accomplished in the code:

ArcGIS Pro SDK Technical Sessions

Beginning Pro Customization Showing Pro Extensibility Patterns of the SDK

Learn how to customize and extend ArcGIS Pro with its .NET SDK. We’ll show you how you can get up and running quickly with the Add-in, Configuration, Plug-in, and Core Host extensibility patterns and provide an overview of “DAML” the declarative extensibility programming language for ArcGIS Pro.

Developer’s Perspective: Diagnosing issues with Performance and Responsiveness in ArcGIS Pro

ArcMon is a diagnostic tool contained in ArcGIS Pro. ArcMon can help determine GUI Hang, application busy state, forground and background tasks, memory usage, and more. This session will demonstrate troubleshooting performance issues within your add-ins in ArcGIS Pro. We will also go over the usage of other performance evaluators such as the performance overlay in map views, ArcGIS Pro PerfTools and other helpful utilities.

Understanding Feature Services, a Guide for Developers

This is an intermediate level session for developers working with Feature Services in Pro. We will discuss feature service architecture and its relation to data storage and editing capabilities including branch versioning. We will provide guidance and insights into deployment options, authoring, publishing, caching, and dataset naming. We will explore how to work with default and named versions, short and long transaction types, and ramifications for save, undo, and cancel edits.

An Overview of the Utility Network Management API

This session will provide an overview of the utility network APIs for developing custom tools and applications for electric, gas, water and wastewater utilities. Topics to be covered will include accessing utility network metadata, tracing, and editing.

Beginning Editing with Focus on EditOperation

In this introductory session you will learn the development patterns for creating and updating features with the Editing API. We introduce the EditOperation and Inspector classes along with the different edit events. Finally you will learn how to create your own construction tool.

Advanced Editing with Focus on UI Customization

Learn how to add your own custom editing functionality into the Pro UI by creating an advanced modify tool. We show customizing the galleries and integration into the modify dockpanes. Additional topics include the EditOperation callback method, and working with mixed database environments.

Effective Geodatabase Programming

ArcGIS developers build applications that can access and interact with a geodatabase. Learn about key programming techniques and APIs that must be employed when developing high-performance geodatabase applications. This session will focus on issues that will allow developers to be more efficient, write less code, and save time. Explore the correct and effective programming patterns that should be employed when using the geodatabase API.

An Overview of the Geodatabase API

This session will provide an overview of the geodatabase .NET API (ArcGIS.Core.Data) for working with data in ArcGIS Pro, including working with datasets, fields, queries, selections, joins and relates.

Real-time Analysis and Visualization using ArcGIS Pro Real-time API

This session will show how to use the Real-time API to analyze, explore, and visualize events in ArcGIS Pro as they are happening in real time – whether you want to find nearby coffee shops from moving vehicles, or sending geo-fencing alerts or spatial analysis to compute affected areas as natural disaster strikes. The session also covers how to add a stream service, visualize latest and previous locations with separate renderers, limit the number of features drawn on a map based on query filter or by feature count, and draw real-time data on charts and perform analysis with them.

Optimizing Content for 3D: Scene Layers and Developers

Customers are creating and commissioning more 3D content than ever before. Esri users and developers need to advise end users on the tools, patterns, and techniques required to create the best performing 3D content for use in GIS. This presentation will discuss tools in ArcGIS for working with 3D content including common patterns in CityEngine and ArcGIS Pro for examining and converting 3D content. The session will also discuss a planned SDK for developers to generate and optimize I3S content.

Introduction to the Parcel Fabric API

This session introduces the Parcel Fabric API which is in pre-release at 2.5. We’ll cover the information model, concepts and editing patterns. Additionally, we’ll highlight COGO-specific patterns such as using ground to grid corrections and converting between different direction formats.

Enhancing the Managed API using the Cartographic Information Model (CIM)

In this session we strip away some of the mystique surrounding the Cartographic Information Model (CIM). The Managed API exposes commonly used functionality, whereas the CIM pattern allows access to more advanced capabilities. We use examples from maps, layers, and reports but the concepts we cover are broadly applicable to all of the CIM in general.

Demonstrating Pro Extensibility with Partner Add-Ins

Learn about the customization opportunities available with the Pro SDK through a series of demonstrations showcasing add-in products from Esri Business Partners. With each demo, we’ll discuss the user workflow, the different Pro APIs used, and resources for developers interested in building similar capabilities.

ArcGIS Pro

more
0 0 99
Esri Contributor

Have noticed that there is arcgis pro sdk OpenItemDialog object which allow developers to use for consistent look and feel like arcgis pro.

Below is the ArcPro github guide.

ProGuide Custom Browse Dialog Filters · Esri/arcgis-pro-sdk Wiki · GitHub 

However if we run into the scenario to get the file types which are not natively support by the sdk.

Actually we can use two other libraries which are provided by microsoft.

For getting folder path - 

using (FolderBrowserDialog tmpDestination = new FolderBrowserDialog())
{

if (tmpDestination.ShowDialog() == DialogResult.OK)
{
this.InputModel.SourceFolderPath = tmpDestination.SelectedPath;


}
}‍‍‍‍‍‍‍‍‍‍

Help doco of that class : FolderBrowserDialog Class (System.Windows.Forms) | Microsoft Docs 

That will look like this.

For getting file for specific extension - like excel files. 

OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Excel Files|*.xls;*.xlsx;*.xlsm";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{

//lets move on with
string filePath = openFileDialog.FileName;
}‍‍‍‍‍‍‍‍

Help doco of that class :OpenFileDialog Class (System.Windows.Forms) | Microsoft Docs 

That will look like this.

All in all the point is that ArcGIS pro sdk is based on the wpf c#, so sometime if sdk don't have build in functionality, we can always go back to foundation to base libraries of wpf and sample out there may be in stackoverflow especially UI customization and, thread management. 

Feel free to comment, it is just my first blog because noticed that could give some ideas to the developer who does not know much about wpf development or .net framework area.

more
2 2 547
New Contributor II

Joining a table is easy. In ArcGIS Pro, you simply right-click a table, goto "Join and Relate" and then select "Add Join". This takes you to a Geoprocessing tool where you select the input join field and output join field and voila, your table is joined !

1. But, when it comes to using the "management.AddJoin" with ExecuteToolAsync(), you actually end up with a new table with the two tables joined together: 

  1. var argsAddJoin = gp.MakeValueArray("C:\\Project\\Sample_database.gdb\\Input_Table""INPUT_ID", "Table_to_Join""OUTPUT_ID""KEEP_ALL");  
  2. var resultAddJoin = await gp.ExecuteToolAsync("management.AddJoin", argsAddJoin);  
  3. string resultingJoinedTable= resultAddJoin.ReturnValue;  

 

2. Then, if you want to recalculate a field in the input table, you would have used the following python code:

  1. // Calculate Field //  
  2. arcpy.management.CalculateField("Resulting_Joined_Table""Resulting_Joined_Table.FIELDNAME""!Table_to_Join.FIELDNAME!""PYTHON3"''"TEXT")  

and expect to use the following code in C#:

  1. var argsCalculateField = gp.MakeValueArray("Resulting_Joined_Table""Resulting_Joined_Table.FIELDNAME""!Table_to_Join.FIELDNAME!""PYTHON3""""TEXT");  
  2. var resultCalculateField = await gp.ExecuteToolAsync("management.CalculateField", argsCalculateField);

But, this won't work. You actually have to reference the original input table that you had "wished to join" in as the input table's name:

  1. var argsCalculateField = gp.MakeValueArray("Resulting_Joined_Table""Input_Table.FIELDNAME""!Table_to_Join.FIELDNAME!""PYTHON3""""TEXT");  
  2. await gp.ExecuteToolAsync("management.CalculateField", argsCalculateField);

more
0 2 148