Hi all , I am trying to write a code how to retrieve imagery from the server as a add data however I am not sure using the "layer" is the right word to call it. Writing in Pyscripter showed me the syntax check is ok however; it brings up another error saying Runtime Error: Object.Create Object cannot open map document (_base.py)
What I am trying to do here is to have MapDocument open and run the script to call and add the imagery to ArcMap without having to manually add them .
import arcpy, os
import arcpy.mapping as mapping
mxd = mapping.MapDocument("CURRENT")
df = mapping.ListDataFrames(mxd)
layer = mapping.Layer(r"S\Las Cruces SSO\NAIP_2009")
mapping.AddLayer(df,layer,"AUTO_ARRANGE")
del mxd