1 / 31

Creating .NET Add-ins for ArcGIS for Desktop

2013 Esri International User Conference July 8–12, 2013 | San Diego, California. Technical Workshop. Creating .NET Add-ins for ArcGIS for Desktop. John Hauck, Chris Fox. Introduction to .NET. What is .NET?. Development framework to build applications for the Windows Platform

caspar
Download Presentation

Creating .NET Add-ins for ArcGIS for Desktop

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. 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Technical Workshop Creating .NET Add-ins for ArcGIS for Desktop John Hauck, Chris Fox

  2. Introduction to .NET Creating .NET Add-Ins for ArcGIS for Desktop

  3. What is .NET? • Development framework to build applications for the Windows Platform • Key Features • Common Language Runtime • Interoperability • Base Class Library • Windows Forms Creating .NET Add-Ins for ArcGIS for Desktop

  4. Base Class Library • Coded solutions to common programming problems • Interacting with databases • Parsing XML • File reading and writing • String manipulation • Working with collections Creating .NET Add-Ins for ArcGIS for Desktop

  5. Windows Forms • Tools and Controls to build GUIs • Toolbars and Menus • Text Box, Combo Box, List View, Button • Layout and Data Binding • Events driven Creating .NET Add-Ins for ArcGIS for Desktop

  6. Supported .NET Versions • When building your add-in you need to target a specific version of .NET • 3.5 is recommended for 10, 10.1 and 10.2 • .NET 3.5 is required for ArcGIS Desktop • 4.0 is supported at 10.1 and 10.2 Creating .NET Add-Ins for ArcGIS for Desktop

  7. Selecting a Language • VB.NET • Syntax closest to VBA and VB6 • C# • Syntax similar to C++ & Java • No difference in performance • Same access to .NET BCL and ArcObjects API Creating .NET Add-Ins for ArcGIS for Desktop

  8. Where to write your code? • Integrated Development Environment (IDE) • Source code editor, Debugger • Visual Studio • Visual Studio 2008 (10.0) • Visual Studio 2010 (10*, 10.1, 10.2) • Visual Studio 2012 (10.2) • Free express version is supported • *2010 VS Express not supported at 10.0 Creating .NET Add-Ins for ArcGIS for Desktop

  9. Visual Studio Key Features • One IDE for all .NET projects • Templates • Code Editor • Syntax highlighting, code completion • Debugger • Windows Forms Designer • Drag/Drop controls Creating .NET Add-Ins for ArcGIS for Desktop

  10. What are Add-Ins? Creating .NET Add-Ins for ArcGIS for Desktop

  11. 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 Creating .NET Add-Ins for ArcGIS for Desktop

  12. Add-In Types supported at ArcGIS 10.2 • Buttons • Tools • Combo Boxes • Multi-Items • Menus • Context Menus • Toolbars • Tool Palettes • Dockable Windows • Application Extensions • Editor Extensions • Editor Construction Tools • SOE (Server) Creating .NET Add-Ins for ArcGIS for Desktop

  13. Add-in Wizard Creating .NET Add-Ins for ArcGIS for Desktop

  14. Add-In File Anatomy XML Metadata Resources Assemblies/JARs/PYDs AddIn File (zipped folder) .*.esriAddIn Creating .NET Add-Ins for ArcGIS for Desktop

  15. 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 Creating .NET Add-Ins for ArcGIS for Desktop

  16. Anatomy – Resources & Localization Creating .NET Add-Ins for ArcGIS for Desktop

  17. 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 { protectedoverridevoid OnClick() { MessageBox.Show("Hello World"); } } Creating .NET Add-Ins for ArcGIS for Desktop

  18. Anatomy - Classic (managed) COM Button comparison Creating .NET Add-Ins for ArcGIS for Desktop

  19. Entry Points for Customization • Add-In Wizard creates static classes depending on your type of customization. publicclassSimpleButton : Button { protectedoverridevoid OnClick() { ArcMap.Application.Caption = "Hello"; ArcMap.Document.ActiveView.Refresh(); } } Creating .NET Add-Ins for ArcGIS for Desktop

  20. Authoring an Add-In Demo Creating .NET Add-Ins for ArcGIS for Desktop

  21. 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 %UserProfile%\My Documents\ArcGIS\AddIns\Desktop10.2 Internet Creating .NET Add-Ins for ArcGIS for Desktop

  22. Add-In File Discovery & Sharing • Administered network shares • Simplifies Updates Intranet Creating .NET Add-Ins for ArcGIS for Desktop

  23. Installation Utility • Double-click “Install” • Customize - Add From File • XCOPY Creating .NET Add-Ins for ArcGIS for Desktop

  24. Add-In Versioning Policy • Add-ins built for previous version will load automatically in newer versions • No need to rebuild or reinstall • Backward compatibility within a major version Creating .NET Add-Ins for ArcGIS for Desktop

  25. Add-In Manager Dialog • Shows detailed information on all installed Add-Ins • Mine vs. Shared • Deleting Add-Ins Creating .NET Add-Ins for ArcGIS for Desktop

  26. Sharing & Security • Custom search folders • Security Settings Creating .NET Add-Ins for ArcGIS for Desktop

  27. Additional Security Settings • Admin Controls • Do not load any add-ins • Load from administrator folders only • Admin security level lock Creating .NET Add-Ins for ArcGIS for Desktop

  28. Digitally Signing Add-Ins • IETF/WC3 XML-DSig standard (within OPC archive) • Trust • Source Traceability • Tampering • ESRISignAddin Utility Creating .NET Add-Ins for ArcGIS for Desktop

  29. Managing Add-Ins Demo Creating .NET Add-Ins for ArcGIS for Desktop

  30. Thank you… Please fill out the session evaluation First Offering ID: 1270 Second Offering ID: 1454 Online – www.esri.com/ucsessionsurveys Paper – pick up and put in drop box Working with Temporal Data

  31. Creating .NET Add-Ins for ArcGIS for Desktop

More Related