if testCount==0: msg = "You must first add a polygon layer or feature class and select some features to report their acreage." pythonaddins.MessageBox(msg, 'Area Report', 0) else: for lyr in arcpy.mapping.ListLayers(mxd): if lyr.isGroupLayer: for sublyr in lyr: tlyr = lyr else: tlyr = lyr dsc = arcpy.Describe(tlyr) sel_set = dsc.FIDSet if dsc.shapeType == "Polygon": if len(sel_set) > 0: with arcpy.da.SearchCursor(tlyr, ("OID@", "SHAPE@AREA")) as cursor: for row in cursor: parea = row[1] + parea resSQFT = parea resAC = parea / 43560 resHA = parea / 107639.104
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.