Hello,
is it possible to access ArcGIS Pro Functions from ArcGISPor SDK from a external Program (CoreHost)?
For example:
1. Start ArcGIS Pro
2. Load a Project (-File)
3. Read all layers in this Project
4. Select Objects (over Attribut) in a layer and zoom to the Object
It means a Remote control to ArcGIS Pro, but not form a AddIn, but fom a external program, wiritten in c#.
Which basic steps we have to follow?
Thanks a lot for any hints!
Solved! Go to Solution.
I attached two sample solutions that show how to remote start and remote control ArcGIS Pro from an ArcGIS Corehost application.
This sample is comprised of two samples:
To use the sample:
1. Make sure this project is available: "C:\Data\FeatureTest\FeatureTest.aprx" or change the path in the Corehost application.
1. Run the client application: ArcGISProConfigCoreHost
1. Note that the AppDomain is modified on startup to resolve the Assembly Paths for ArcGIS.Core.dll and ArcGIS.CoreHost.dll by using the ArcGIS Pro installation location.
1. The ArcGISProConfigCoreHost console application starts ArcGIS Pro with the "ArcGISProConfig" Managed Configuration
1. Once ArcGISProConfig has started and is ready, ArcGISProConfigCoreHost sends the project path: "C:\Data\FeatureTest\FeatureTest.aprx" to be opened
1. ArcGISProConfig opens the project
1. Once the output stops press any key to close the application.
1. Close the "ArcGISProConfig" client session (ArcGIS Pro) using the User Interface. Note that closing can be automated as well.
1. The "ArcGISProConfigCoreHost" Corehost application terminates after ArcGIS Pro has been closed.
i think you would start ArcGIS Pro (from a console app) using a Configuration. The Configuration extension option allows you to write custom code for the start sequence (i.e. loading a project, zoom in, add layers etc.), and then either look at instructions in a file or use some type of Inter Process Communication between you two processes. So in essence this would allow you to automate some ArcGIS Pro (Desktop app) processing. Here is more information on Configurations in case you are not familiar: ProConcepts Configurations · Esri/arcgis-pro-sdk Wiki (github.com)
I will try to write some sample code that shows this type of workflow and post it here.
I attached two sample solutions that show how to remote start and remote control ArcGIS Pro from an ArcGIS Corehost application.
This sample is comprised of two samples:
To use the sample:
1. Make sure this project is available: "C:\Data\FeatureTest\FeatureTest.aprx" or change the path in the Corehost application.
1. Run the client application: ArcGISProConfigCoreHost
1. Note that the AppDomain is modified on startup to resolve the Assembly Paths for ArcGIS.Core.dll and ArcGIS.CoreHost.dll by using the ArcGIS Pro installation location.
1. The ArcGISProConfigCoreHost console application starts ArcGIS Pro with the "ArcGISProConfig" Managed Configuration
1. Once ArcGISProConfig has started and is ready, ArcGISProConfigCoreHost sends the project path: "C:\Data\FeatureTest\FeatureTest.aprx" to be opened
1. ArcGISProConfig opens the project
1. Once the output stops press any key to close the application.
1. Close the "ArcGISProConfig" client session (ArcGIS Pro) using the User Interface. Note that closing can be automated as well.
1. The "ArcGISProConfigCoreHost" Corehost application terminates after ArcGIS Pro has been closed.
Thanks a lot for this nice Example!