AnsweredAssumed Answered

Add feature to current APRX and Map in PRO?

Question asked by deleted-user-yC5VkbyXzrQR on Oct 14, 2019
Latest reply on Oct 15, 2019 by deleted-user-yC5VkbyXzrQR

Is there a way to add a feature to the current MAP that is open in Pro, in a stand alone script? 

I know the below code adds it to the first map. 

 

But what if I want to add it to whatever map I have opened? 

The other option is to create a new map in the CURRENT APRX and add the features there. It would be more user friendly if it could add it to the map that you are currently on. 

 

aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.listMaps()[0]


mp.addDataFromPath(fgdb + "\\" + e + "_buffer")

 

Regards, 

 

Adam 

Outcomes