<type 'exceptions.TypeError'>: unbound method removeAll() must be called with Array instance as first argument (got nothing instead)
for df in frames: #Creates a polygon object poly = arcpy.Polygon(arcpy.Array([df.extent.lowerLeft, df.extent.lowerRight, df.extent.upperRight, df.extent.upperLeft]), df.spatialReference) featureList.append(poly) # All done
import arcpy,os #Declare Variables mxd = arcpy.GetParameter(0) outLocation = arcpy.GetParameterAsText(1) outName= arcpy.GetParameterAsText(2)+".shp" outPath = os.path.join(outLocation,outName) featureList = [] ar=arcpy.Array #Export the table values to a string maps=mxd.exportToString() #Remove field delimiters maps = maps.replace("'",'').strip() arcpy.AddMessage(maps) maplist= maps.split(';') arcpy.AddMessage(maplist) #Cycle through list of maps for mapp in maplist: arcpy.AddMessage(mapp) mxd1 = arcpy.mapping.MapDocument(mapp) frames = arcpy.mapping.ListDataFrames(mxd1) #Cycle through the list for df in frames: #Creates a polygon object poly = arcpy.Polygon(ar([df.extent.lowerLeft, df.extent.lowerRight, df.extent.upperRight, df.extent.upperLeft]), df.spatialReference) featureList.append(poly) #Remove the array for the next polygon ar.removeAll(ar)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.