Select to view content in your preferred language

AddIn config ArcGIS Pro

806
4
08-14-2023 12:22 PM
IgorReuter
Emerging Contributor

As we usually use arcmap.exe.config to parameterize some keys on ArcMap, which archive on ArcGIS Pro is possible to use to build an AddIn?

0 Kudos
4 Replies
RichardDaniels
Frequent Contributor

I think this is what you are looking for: Manage application settings—ArcGIS Pro | Documentation

There are three basic steps to control application settings in your ArcGIS Pro deployment:

  1. Author a Pro.settingsConfig file.
  2. Post the file to a directory or share accessible by users.
  3. Configure the user machines to use the deployed file.
0 Kudos
IgorReuter
Emerging Contributor

Tks, Richard.

how do I use the Pro.settingsConfig file in my AddIn? How do I get his information using the Pro's .net sdk?

0 Kudos
RichardDaniels
Frequent Contributor

The Pro.settingsConfig is not actually used with an Add-In, rather it sets default behavior for ArcGIS Pro on startup. The config file is just a human readable text file. The easiest way to point to this is to add the ADMIN_SETTINGS_PATH command line parameter during an ArcGIS Pro silent installation, The second way to configure client machines is by editing the Windows Registry. Use this option if ArcGIS Pro is already deployed or if you don't want to do a silent installation. To configure the client machines, create a string value called AdminSettingsPath in HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro\Settings. Set the value data to the path of the network share or local folder that contains the deployed Pro.settingsConfig file.

Some XML Tags you could include in your config file are shown at https://pro.arcgis.com/en/pro-app/latest/get-started/administrator-settings-list.htm

Have you considered revising how your Add-In works to take advantage of a Tabbed Interface?  

0 Kudos
RichardDaniels
Frequent Contributor

In regards to 'seeing' the values set in your XML config file from an Add-in, you can pull the properties from the namespace (e.g., ArcGIS.Desktop.Core.ApplicationOptionsArcGIS.Desktop.Core Namespace (ArcGIS.Desktop.Core)—ArcGIS Pro OR you could just read the .xml config file just like any other text file from your Add-in.

For example, 

0 Kudos