Trigger Update DAML XML Tree a second time

818
3
03-15-2021 12:58 AM
KarlHuber
New Contributor III

Hello dear SDK-Dev-Team

Is it possible to trigger the update of the DAML XML Database in the ConfigurationManager a second time?

In detail:

We have written a Configuration AddIn for Pro and use an ArcGIS.Desktop.Framework.Contracts.ConfigurationManager Instance. In this ConfigurationManager we override the method

protected override void OnUpdateDatabase(XDocument database)
{
  EvaluateDatabase(database);
}

...and modify the DAML XML tree.

However:

After we pop up our Custom Start Page, we want to make some subsequent modifications to the DAML XML. Since on our Start Page some information of which buttons and groups should be visible have been selected...

My question:

Is it possible to trigger the update of the DAML XML database and thus the build of the Pro application a second time from a Custom Start Page?

How can this be achieved programmatically?

Thanks a lot in advance for your suggestions.

Greetings

 

Karl

 

 

0 Kudos
3 Replies
KirkKuykendall1
Occasional Contributor III

The documentation says "last chance", so I assume you can't.

As a workaround, maybe instead launch a new instance of ArcGISPro.exe using Process.Start after user selects choices on initial start page, then exit.  Pass in command line argument for /config:config_name or as a custom command line argument.

If you go with the custom command line args, you can parse them in your override of OnUpdateDatabase to specify what buttons and groups should be visible.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Kirk's assessment is correct, OnUpdateDatabase presents the last opportunity to make changes to the DAML model.  I tried different workarounds, but the only workaround I found was to replace the splash screen with a popup window that prompts the user for input.  Needless to say this means that your code-behind on the splash screen cannot use any Pro API functionality.  I attached my sample app in case it can be of use.

0 Kudos
KarlHuber
New Contributor III

Thank you Kirk and Wolf for your prompt responses. I think we need to rethink our launch process for the Pro App.

Launching Pro with certain configuration arguments seems a stable solution to me.

Thank you Wolf for the tip about replacing the splash, I will take a look at that...

0 Kudos