I have created ArcGIS pro managed configuration project and I want to bypass start page and open predefined .apr file directly when arcpro is called with configuration. Kindly help me for this
Solved! Go to Solution.
Or if you want to open a project programmatically you can add the following snippet in the override for OnApplicationReady of your ConfigurationManager class implementation:
protected override void OnApplicationReady()
{
try
{
var aprxPath = @"c:\...\ProProjectFile.aprx";
Project.OpenAsync(aprxPath);
}
catch (Exception ex)
{
MessageBox.Show ($@"Error: ex.Message");
}
}
For the OnShowStartPage override just return null.
just specify the path to the project at the end of the command line (after the /config:xxxxxxx bit). If the path has spaces u will need to use quotes.
refer to ProGuide Command line switches for ArcGISPro.exe for all the available command line switches fyi.
Or if you want to open a project programmatically you can add the following snippet in the override for OnApplicationReady of your ConfigurationManager class implementation:
protected override void OnApplicationReady()
{
try
{
var aprxPath = @"c:\...\ProProjectFile.aprx";
Project.OpenAsync(aprxPath);
}
catch (Exception ex)
{
MessageBox.Show ($@"Error: ex.Message");
}
}
For the OnShowStartPage override just return null.
It worked but it shows start page for a second then loads the aprx file