Referencing ArcGIS.Desktop dlls in CoreHost solutions

566
1
04-02-2020 06:37 AM
DavidLaMartina
New Contributor III

We have some functionality that needs to exist in both an ArcGIS Pro Add-In and a standalone CoreHost application. Clearly the CoreHost application cannot use many of the constructs provided by the ArcGIS.Desktop dlls - imported layouts, the MCT / GUI threading system, etc.

However, what would be the problems, if any, of referencing certain ArcGIS.Desktop dlls and using certain classes that don't (seem) to cause any issues? I have already done this in said CoreHost application, using some of our models classes that rely upon the ArcGIS.Desktop namespaces. As long as I don't use certain operations (e.g. attempt to run in a QueuedTask, attempt to import a Layout, etc.), everything is running fine.

For instance, this CoreHost project references one of our models classes, which itself has a reference to ArcGIS.Desktop.Layouts.MapFrame.

Thank you,

David

Tags (2)
0 Kudos
1 Reply
AlanStewart
Occasional Contributor

I have similar concerns. My add-in performs custom PDF export of layouts. To automate testing, and in the future to provide a Python interface, I need to be able to open projects, retrieve layouts, export layouts, access feature classes and features present in the layout.

0 Kudos