Download presentation
Presentation is loading. Please wait.
1
Building Add-ins for ArcGIS Desktop in .NET
July 26, 2012 Building Add-ins for ArcGIS Desktop in .NET Russell Louks and Steve Van Esch
2
ArcGIS Desktop Add-Ins
A better way to customize and extend ArcGIS Desktop applications. Easier to build Easy to share More secure C#, VB.NET, Java, and Python
3
Add-In Types supported at ArcGIS 10.1
Buttons Dockable Windows Tools Application Extensions Combo Boxes Editor Extensions Multi-Items Editor Construction Tools Menus SOE (Server) Context Menus Toolbars Tool Palettes
4
Supported Development Environments
Visual Studio 2010 Visual Basic 2010 Express Edition Visual C# Express Edition Eclipse IDE for Java Developers .NET 3.5, .NET 4.0
5
New at ArcGIS 10.1 IDE and Authoring Improvements
Extended Help Capabilities CHM, WEB help, PDF, etc. New Types Editor Construction Tools Sever Object Extensions (SOEs) Python Add-Ins
6
Add-In File Anatomy AddIn File XML Metadata Resources (zipped folder)
Assemblies/JARs/PYDs AddIn File (zipped folder) .*.esriAddIn
7
Anatomy – Resources & Localization
8
Anatomy - Declarative Aspects
<DockableWindows> <DockableWindow id="ESRI_Example_DockableWindow" class="ExampleDockableWindowClass" caption="Example Dockable Window"> <InitialPlacement height="300" width="300" state="pinned" position="right" neighbor="esriArcMapUI.TOCDockableWindow" /> </DockableWindow> </DockableWindows> <AddIn language="CLR" library="ESRI.ArcGIS.SchemaGenerationWizard.dll" namespace="CaseUI.SchemaGenerationWizard"> <ArcCatalog> <Commands> <Button id="SchemaGenerationWizard_SchemaGenerationWizard" class="SchemaGenerationWizard" tip="Use the Schema Generation Wizard..." message="Schema Generation Wizard" caption="Schema Generation Wizard" category="CASE Tools" image="Images\SchemaGenerationWizard.png" /> </Commands> </ArcCatalog> </AddIn> <ESRI.Configuration xmlns= xmlns:xsi=" <Name>CASE Tools</Name> <AddInID>{f390c49d-a7a9-4b9f-a627-20f1ee3d5ca6}</AddInID> <Description>Case Tools</Description> <Version>1.0</Version> <Image>Images\CaseTools.png</Image> <Author>ESRI</Author> <Company>ESRI</Company> <Date>04/23/2010</Date> <Targets> <Target name="Desktop" version="10.0" /> </Targets> ID Images Target Category Author Toolbars content Version Menu content Company Docking state Website Docking position Descriptions Tooltips Captions Help
9
Anatomy - Programmatic Aspect
Add-In Behavior coded using Visual Studio / Eclipse wizards and templates Base classes for each Add-In type Full ArcObjects API + programming environment (.NET/Java) public class SimpleButton : Button { protected override void OnClick() MessageBox.Show("Hello World"); }
10
Anatomy - Classic (managed) COM Button comparison
11
Add-In File Discovery & Sharing
Internet Add-In files are automatically discovered in well known local folders and incorporated into the Desktop applications at runtime. Folders are per user and per ArcGIS version Under Windows Vista & Windows 7: C:\Users\<username>\Documents\ArcGIS\AddIns\Desktop10.1 Under Windows XP: C:\Documents and Settings\<username>\My Documents\ArcGIS\AddIns\Desktop10.1
12
Add-In File Discovery & Sharing
Administered network shares Simplifies Updates Intranet
13
Managing Add-Ins - Installation Utility
Double-click “Install” Customize - Add From File XCOPY
14
Add-In Versioning Policy
Backward compatibility within a major version ArcGIS 10.1 can consume 10.0 Add-Ins ArcGIS 10.0 cannot consume 10.1 Add-Ins
15
Managing Add-Ins – Add-In Manager Dialog
Shows detailed information on all installed Add-Ins Mine vs. Shared Deleting Add-Ins
16
Managing Add-Ins – Sharing & Security
Custom search folders Security Settings
17
Managing Add-Ins - Additional Security Settings
Admin Controls Esri Only Load from administrator folders only Admin security level lock
18
Managing Add-Ins Demo
19
Digitally Signing Add-Ins
IETF/WC3 XML-DSig standard (within OPC archive) Trust Source Traceability Tampering ESRISignAddin Utility
20
Moving to Add-Ins Porting guidelines Do not rely on:
internal static SampleExt _me; public SampleExt() { _me = this; } internal static SampleExt Me { get UID id = ThisAddIn.IDs.SampleExt.ToUID(); ArcMap.Application.FindExtensionByCLSID(id); return _me; } public void Foo() Moving to Add-Ins // Finding the extension... Add-In style. protected override void OnClick() { // Call custom method.. SampleExt.Me.Foo(); } // Finding the extension... COM style. protected override void OnClick() { // Find the custom COM interface.. IApplication app = this.Hook as IApplication; ICustExt ext = app.FindExtensionByName("ACME.SampleExt") as ICustExt; // Call custom method.. ext.Foo(); } Porting guidelines .html#/How_to_migrate_from_COM_components_to_add_ins/ z Do not rely on: COM Components requiring registration Assemblies requiring registration in the GAC Pre-existing dependencies Public API exposure IDispatch for external access Most business logic should not need to be changed
21
Authoring an Add-In Demo
22
Questions
23
External Links WC3 XML Digital Signatures
ArcGIS Desktop Add-Ins esktop/ w WC3 XML Digital Signatures ISO/IEC :2008 Open Packaging Conventions ITU X.509 Certificates ISO Language Codes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.