|
- # -*- coding: utf-8 -*-
- # Import system modules
- import sys
- import os
- import string
- import arcpy
- from arcpy import env
-
- # Set environment settings
- env.workspace =u"D:\\tk\\tst.gdb" #修改需要统计的gdb所在路径,请用双斜杠
- f=file(txtna,'a+')
- for fc in arcpy.ListFeatureClasses():
- #print fc
- ysmun=arcpy.GetCount_management(fc).getOutput(0)
- #print ysmun
-
- tg=fc+' '+str(ysmun)
- print tg
-
- #f.write(fc)
- #f.write(tg)
-
- #f.write('\r\n')
- #f.close()
- print u"总表统计完成"
复制代码 |
|