ArcGIS Pro SDK for .NET: Introduction, Samples, and How to...
Transcript of ArcGIS Pro SDK for .NET: Introduction, Samples, and How to...
ArcGIS Pro SDK for .NET:Introduction, Samples, and How to Contribute
Uma Harano, Wolfgang Kaiser
What is the ArcGIS Pro SDK
• Customization with Tasks• .NET Addins for extending Pro (C#, VB)• Arcpy for automating Pro (Python 3.4)• Modern asynchronous API (native .NET)• Pro SDK Resources
- ProSamples- ProConcepts- ProTutorials- ProSnippets- API Reference- … more
.NET Extensibility Through Add-ins
• Familiar extensibility model to desktop programmers• Any of ArcGIS Pro’s UI Elements can be used by Add-ins• Add-ins consist of: A module and code files An xml Configuration file (Config.daml) A .esriAddinX deployed to a well known folder
.Net SDK Development Patterns
• ArcGIS Pro is a:- WPF Application using .Net 4.5- Multi-threaded Application
• .NET Addins for extending Pro are:- WPF with .Net 4.5- Are Multi-threaded- Using the ArcGIS Pro API – which comes with Pro out-of-box
DEMO 1
DAML
• Add-ins introduced at 10. • Notion of xml based configuration – Add-in UI aspects declaratively
defined• For Pro, the entire UI is declaratively defined
- Extensions use DAML same as Add-ins
Framework constructs the UI based on the combination of elements declared in Extensions daml + Addins daml- Insert (implicit)- Update- Delete
DAML –element hierarchy
DEMO
Conditions, States, and Declarative UI• We say ArcGIS Pro has a conditional or contextual UI• Simplifies the “Enabled” coding pattern (as compared to ArcObjects)• Conditions and States control the Visibility of Dockpanes and
Ribbons.- Condition == true means Visible- Condition != true means Hidden
Map View
Layout View
Executing Commands
• System.Windows.Input.ICommand Pattern as used in .Net / WPF • ArcGIS Pro ICommand Interface on IPlugInWrapper• Each command (and all UI elements) identified by a unique identifier (id attribute in
DAML)
ICommand proCmd = FrameworkApplication.GetPlugInWrapper(
DAML.Button.esri_mapping_newMapButton) as ICommand;
if (proCmd.CanExecute(null))
proCmd.Execute(null);
DEMO
ArcGIS Pro SDK Components
• ArcGIS Pro SDK Visual Studio Extensions:- ArcGIS Pro SDK for .NET- ArcGIS Pro SDK for .NET (Utilities) - ArcGIS Pro SDK for .NET (Snippets)
• Deployed using VSIX packages• No admin privilege required.• Hosted on the Visual Studio Gallery
Developer Resources
• Accessible from https://pro.arcgis.com/en/pro-app/• All ArcGIS Pro SDK Developer Resources hosted on GitHub.com/Esri• http://github.com/Esri/arcgis-pro-sdk...• Repositories available with ArcGIS Pro 1.1 Beta:
- arcgis-pro-sdk- ProConcepts, ProSamples, ProGuides, ProTutorial, ProSnippets
- arcgis-pro-sdk-common- Library of utility methods to use in your Add-in.
- arcgis-pro-sdk-community-samples- Accept pull requests from the user community.
• Online API Reference
Demo