I'm trying to use the arcpy module in functions that are within custom Python modules that I've created, but I keep getting this error:
NameError: global name 'arcpy' is not defined
How do I fix this? These modules will be used within ArcGIS, where ArcPy is already loaded.
I've tried with and without "import arcpy".
''' Refreshes map and TOC '''
return 'Refreshed map and TOC.'