This python code I thought was stating that if projectFile was a polygon and had more than one polygon, dissolve it and make the zoneFile equal to the dissolve file. Otherwise, make the zoneFile equal to projectFile. Ideas? Using ArcGIS 10.1. It is dissolving all polygon shapefiles, regardless of whether there is just one polygon or multiple polygons.
Thank you in advance.
Code:
projectFile = shapefileDir + "\\" + base + ".shp"
if shapeType == "Polygon":
arcpy.AddMessage(shapeType)
if int(arcpy.GetCount_management(projectFile).getOutput(0)) > 0: # I also used > 1 with no change
dissolveFile = geodatabaseLocation + "_Dissolve"
arcpy.Dissolve_management(projectFile, dissolveFile,"", "", "SINGLE_PART", "DISSOLVE_LINES")
arcpy.AddMessage("Dissolving multipolygons")
zoneFile = dissolveFile
else:
zoneFile = shapefileDir + "\\" + base + ".shp"