# Import system modules import sys, string, os, arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Script arguments... ftrLyr = sys.argv[1] if ftrLyr == '#': gp.AddError(" You must provide a feature layer.") # Check to see if the input exists if gp.Exists(ftrLyr): desc = gp.Describe(ftrLyr) ftrPath = desc.Path ext = ftrPath.rpartition('.')[2] # Get part after last period. ext = ext.lower() if ext == "gdb": gp.AddMessage(" Workspace is file geodatabase") elif ext == "mdb": gp.AddMessage(" Workspace is personal geodatabase") else: gp.AddMessage(" Workspace is directory based (shapefile, coverage, etc.)")
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.