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.