I am trying to import a layout file (.pagx) to the ArcGIS Pro project using the following code snippet and it works properly but it adds new map to the project each time.
IProjectItem layoutItem = ItemFactory.Instance.Create(file, ItemFactory.ItemType.PathItem) as IProjectItem;
I want to reuse the existing map in the project like when you import a file manually you have the option to reuse existing maps.
Is there any wasy I can do this using the SDK?
Solved! Go to Solution.
Thank you for your feedback. The only solution currently is to remape the map frame and map surrounds to the current maps and then delete the newly added project item. We are looking into adding method parameters to accomodate the UI setting.
Jeff - Layout and arcpy.mp teams.