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
Solved! Go to Solution.
ArcGISProject—ArcPy | ArcGIS Desktop
activeMap???
activeMap (Read Only)Returns the map object associated with the focused view within the application. None will be returned if there are no views open that have an associated map or when a script is run outside of the application.
ArcGISProject—ArcPy | ArcGIS Desktop
activeMap???
activeMap (Read Only)Returns the map object associated with the focused view within the application. None will be returned if there are no views open that have an associated map or when a script is run outside of the application.
Thanks Dan!
I feel like I owe you something, always answering.
Do you go to the Dev Summit in March ?