标签:cep red def must tables rcp nbsp 一个 desc
# -*- coding: cp936 -*- import xlrd # must init xlrd import arcpy import os def main(): arcpy.env.workspace =gdbFile datasets = arcpy.ListDatasets() for dataset in datasets: arcpy.AddMessage(u"gisoracle删除数据集"+dataset) arcpy.Delete_management(dataset,"FeatureDataset") featureclasses = arcpy.ListFeatureClasses() for fc in featureclasses: arcpy.AddMessage(u"gisoracle删除要素类"+fc) arcpy.Delete_management(fc) tables = arcpy.ListTables() for table in tables: arcpy.AddMessage(u"gisoracle删除表格"+table) arcpy.Delete_management(table) rasters = arcpy.ListRasters() for raster in rasters: arcpy.AddMessage(u"gisoracle删除栅格"+raster) arcpy.Delete_management(raster) gdbFile = arcpy.GetParameterAsText(0) #gdb try: main() #arcpy.SetParameterAsText(3, inFeature) # Is polygon except Exception, ErrorDesc: arcpy.AddError(u"错误:"+str(ErrorDesc))
标签:cep red def must tables rcp nbsp 一个 desc
原文地址:https://www.cnblogs.com/gisoracle/p/11361010.html