# 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.)")
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.