Hello,
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;
Project.Current.AddItem(layoutItem);
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?
Thank you.
Solved! Go to Solution.
We added this capability to the Pro SDK at 3.0. Thank you for your feedback.
Jeff - arcpy.mp and Layout teams
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.
Thank you very mush for response.
I hope it will be available soon.
We added this capability to the Pro SDK at 3.0. Thank you for your feedback.
Jeff - arcpy.mp and Layout teams
Was this added? I've run into the same issue and I'm not able to find documentation for it.
Try this link: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic76003.html
Jeff - Layout and arcpy.mp teams