My organization creates a number of layer files for our ArcMap users to access data from web services. Is there any way to use
arcpy.Describe to get to the URL of the service referenced by the layer? My testing so far has only yielded paths back to the layer file itself, or a temp folder:
>>> d=arcpy.Describe(r'e:\geodata\ortho_imagery\naip_ca_historical.lyr') >>> d.catalogPath u'e:\\Geodata\\ortho_imagery\\naip_ca_historical.lyr' >>> l=d.layer >>> l.catalogPath u'C:\\Users\\bjorn\\AppData\\Local\\Temp\\3\\NAIP_Historical/California_Historical'
I'd also be open to a .NET solution if necessary.
The ultimate goal is to develop a tool that will scan our shared drive for .lyr files, and if they refer to a web service, test its validity.