Skip to content

ProGuide ArcGIS AllSource Project Template

UmaHarano edited this page May 6, 2024 · 1 revision
Language:      C#
Subject:       Framework
Contributor:   ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization:  Esri, http://www.esri.com
Date:          04/04/2024
ArcGIS Pro:    3.3
Visual Studio: 2022

Overview

At release 3.3, the ArcGIS Pro SDK for .NET provides a new project template for creating a module add-in for ArcGIS AllSource. This guide will walk you through the steps to create a new module add-in project for ArcGIS AllSource using this new project template.

Note: Configurations are not supported with ArcGIS AllSource.

In this topic

Create a new ArcGIS AllSource Add-in project

Prerequisite:

Before you can build an ArcGIS AllSource add-in, you must have ArcGIS AllSource 1.2+ installed along with the corresponding version of the ArcGIS Pro SDK on your development machine (currently at version 3.3). For details on how to install the ArcGIS Pro SDK you can follow the installation instructions in this ProGuide: Install ArcGIS Pro SDK for .NET.

Step 1

Open Visual Studio and select 'Create a New Project'.

Create a New Project

Step 2

On the 'Create a New Project' dialog, use the 'Project Types' dropdown to select 'ArcGIS AllSource SDK'. Make sure that the 'Languages' dropdown is set to 'C#' or to the 'All Languages' default. Select 'ArcGIS AllSource Add-in' as the Project Type and click 'Next'.

Select AllSource Add-in

Step 3

The 'Configure you new project/ArcGIS AllSource Add-in' dialog displays allowing you to override the default project name and the default project location. Change the default settings or accept the default. Click 'Create'.

Configure AllSource Add-in

Step 4

Visual Studio creates a new Visual C#. You will notice the following content in your new project:

NewAllSourceContent

The Config.daml file opens (by default) in Visual Studio. The content of an ArcGIS AllSource config.daml file is similar to the content of an ArcGIS Pro config.daml file. The Config.daml file contains the additional 'product' attribute under the AddInInfo tag:

NewAllSourceConfigDaml

Note that the module contains a private reference to your module instance, which is a singleton. The string "<your_app_name>_Module" is your module ID. Framework uses this ID to reference your module in the DAML file and to find your associated module instance in the FindModule method of the FrameworkApplication module. By default, your module class is called Module1. The default namespace is the name of your project.

Step 5

Compile and build the project. If you have errors in your output window, check that you have the ArcGIS AllSource application and the ArcGIS Pro SDK for .NET correctly installed. As long as you have not changed the syntax in any of the generated files (from the Project template), there should be no compilation errors.

Step 6

Next you can start to customize your ArcGIS AllSource Add-in. There is no difference in the customization of an AllSource or ArcGIS Pro Add-in. To customize your AllSource Add-in, you can follow the steps in the various Pro Guides available in the Pro SDK wiki TOC. For example: ProGuide Build your first add-in.

Convert an existing ArcGIS Pro Add-in project into an AllSource Add-in project and vice versa

Prerequisite:

The prerequisites for these steps are the same as for creating a new ArcGIS AllSource Add-in project. Assuming you have AllSource version 1.2 or better installed:

Either convert an existing ArcGIS Pro Add-in project into an AllSource Add-in project

In your ArcGIS Pro Add-in Project open the 'config.daml' file, and add the 'product' attribute to the AddInInfo tag if it is missing. Set the 'product' attribute value to 'AllSource'. Change the desktopVersion attribute to be the minimum AllSource release version that you want to support. For example, to support AllSource v1.2, you would set the desktopVersion attribute value to 1.2. Configurations cannot be converted to use ArcGIS AllSource. Add-ins only.

Note: Starting at release 3.3, ArcGIS Pro Add-ins made with the Pro SDK will have a new 'product' attribute, with a value of "ArcGISPro", that has been added to their <AddInInfo /> element at the top of the Config.daml. This attribute is optional for ArcGIS Pro Add-ins so if it is not present (as will be the case for all addins made prior to 3.3) then a value of "ArcGISPro" is always assumed. This attribute does not need to be added unless you want to change an Add-in to use AllSource. An AllSource Add-in must always have a product="ArcGISAllSource" attribute.

For example to change this ArcGIS Pro Add-in Config.daml file to use AllSource:

<AddInInfo id="{f..1}" version="1.0" 
             desktopVersion="3.2"> <!-- no product attribute, prior to 3.3 -->
             ...
</AddInInfo>

-- or -- 

<AddInInfo id="{f..1}" version="1.0" 
             desktopVersion="3.3" product="ArcGISPro"><!-- this has a product attribute -->
             ...
</AddInInfo>

Change both the desktopVersion and the product attribute. If the product attribute is missing from <AddInInfo /> then you must add one:

<AddInInfo id="{f..1}" version="1.0" 
             desktopVersion="1.2" product="ArcGISAllSource"><!-- note the desktopVersion -->
             ...
</AddInInfo>

Note: AllSource has a different product versioning scheme than Pro, hence the need to always change the desktopVersion. Current AllSource versioning at the time of the Pro 3.3 release is AllSource version 1.2.

Or convert an existing AllSource Add-in project into an ArcGIS Pro Add-in project

Perform the Config.daml update steps above in reverse. You can either change the product attribute back to "ArcGISPro" or delete it entirely. Make sure to change the desktopVersion back to the relevant Pro version. In this case, the desktopVersion is changed back to 3.3:

<AddInInfo id="{f..1}" version="1.0" 
             desktopVersion="3.3" product="ArcGISPro"><!-- or delete the product attribute entirely-->
             ...
</AddInInfo>

Step 2

You must also change the project references to point to the AllSource product (or back to the ArcGIS Pro product depending on whether you are switching to or from AllSource). Right-click on the project in the Solution Explorer and select the ArcGIS Pro SDK 'Pro Fix References' tool. This tool fixes the references for both AllSource and Pro projects. You can install it as part of the ArcGIS Pro SDK for .NET utilities .vsix.

Step 3

To check that the conversion was successful, compile and rebuild the project and validate the output.

Developing with ArcGIS Pro

    Migration


Framework

    Add-ins

    Configurations

    Customization

    Styling


Arcade


Content


CoreHost


DataReviewer


Editing


Geodatabase

    3D Analyst Data

    Plugin Datasources

    Topology

    Object Model Diagram


Geometry

    Relational Operations


Geoprocessing


Knowledge Graph


Layouts

    Reports


Map Authoring

    3D Analyst

    CIM

    Graphics

    Scene

    Stream

    Voxel


Map Exploration

    Map Tools


Networks

    Network Diagrams


Parcel Fabric


Raster


Sharing


Tasks


Workflow Manager Classic


Workflow Manager


Reference

Clone this wiki locally