Frequently asked question
No, it is not possible to use the CURRENT keyword in a stand-alone Python script. The sample below shows how to use the CURRENT keyword in a script:
import arcpy aprx = arcpy.mp.ArcGISProject("CURRENT")
When attempting to run the script in a standalone environment, the following error is returned:
Error: OSError: CURRENT
This is expected behavior, as the CURRENT keyword only works within ArcGIS Pro and ArcMap.The CURRENT keyword references the arcpy.mp module to identify an open map in ArcGIS Pro. In a standalone environment, there is no map open which disables the ability to use the CURRENT keyword available in the ArcPy module.
Get help from ArcGIS experts
Download the Esri Support App