1 / 24

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

Télécharger la présentation

Building Add-ins for ArcGIS Desktop in .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 • Tools • Combo Boxes • Multi-Items • Menus • Context Menus • Toolbars • Tool Palettes • Dockable Windows • Application Extensions • Editor Extensions • Editor Construction Tools • SOE (Server)

  4. Supported Development Environments • Visual Studio 2010 • Visual Basic 2010 Express Edition • Visual C# 2010 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 XML Metadata Resources Assemblies/JARs/PYDs AddIn File (zipped folder) .*.esriAddIn

  7. Anatomy – Resources & Localization

  8. Anatomy - Declarative Aspects <ESRI.Configurationxmlns=http://schemas.esri.com/Desktop/AddIns xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <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> <Targetname="Desktop"version="10.0" /> </Targets> <AddInlanguage="CLR" library="ESRI.ArcGIS.SchemaGenerationWizard.dll" namespace="CaseUI.SchemaGenerationWizard"> <ArcCatalog> <Commands> <Buttonid="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> <DockableWindows> <DockableWindowid="ESRI_Example_DockableWindow" class="ExampleDockableWindowClass" caption="Example Dockable Window"> <InitialPlacement height="300" width="300" state="pinned"position="right" neighbor="esriArcMapUI.TOCDockableWindow"/> </DockableWindow> </DockableWindows> </DockableWindows> • ID • Target • Author • Version • Company • Website • Descriptions • Captions • Images • Category • Toolbars content • Menu content • Docking state • Docking position • Tooltips • 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) publicclassSimpleButton: Button { protectedoverridevoidOnClick() { MessageBox.Show("Hello World"); } }

  10. Anatomy - Classic (managed) COM Button comparison

  11. Add-In File Discovery & Sharing • 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 Internet

  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 internalstaticSampleExt_me; publicSampleExt() { _me = this; } internalstaticSampleExtMe { get { UIDid = ThisAddIn.IDs.SampleExt.ToUID(); ArcMap.Application.FindExtensionByCLSID(id); return_me; } } publicvoidFoo() { } // Finding the extension... Add-In style. protectedoverridevoidOnClick() { // Call custom method.. SampleExt.Me.Foo(); } // Finding the extension... COM style. protectedoverridevoidOnClick() { // Find the custom COM interface.. IApplicationapp = this.HookasIApplication; ICustExtext = app.FindExtensionByName("ACME.SampleExt") asICustExt; // Call custom method.. ext.Foo(); } • Porting guidelines • http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_migrate_from_COM_components_to_add_ins/0001000003z6000000 • 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 • ArcGIS Desktop Add-Ins • http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Building_add_ins_for_ArcGIS_Desktop/0001000000w2000000 • WC3 XML Digital Signatures • http://www.w3.org/Signature/ • ISO/IEC 29500-2:2008 Open Packaging Conventions • http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51459 • ITU X.509 Certificates • http://www.itu.int/rec/T-REC-X.509/en • ISO Language Codes • http://www.loc.gov/standards/iso639-2/php/code_list.php

More Related