|
POST
|
Try using the full file path to the dataset Veredas
... View more
07-22-2015
09:35 AM
|
0
|
4
|
2078
|
|
POST
|
You can use the dissolve tool with no attributes selected to dissolve you polygons based on contiguity. ArcGIS Help 10.1 Another option is using the Minimum Bounding Geometry Tool - Convex Hull. ArcGIS Help 10.1
... View more
07-22-2015
07:51 AM
|
0
|
0
|
1097
|
|
POST
|
It would be something like this. Expression: Reclass(!FieldwithNullValuesHere!) Expression Type: Python_9.3 Code Block: def Reclass(field): if field == "None": return "No" else: return "Yes"
... View more
07-20-2015
02:23 PM
|
0
|
0
|
1238
|
|
POST
|
Hey Joe, You can catch the error in a try-except block. This should allow your script to run on the rest of your values, and you can put messages in the except block telling which features had the issue. See https://docs.python.org/2/tutorial/errors.html section 8.3
... View more
07-20-2015
01:13 PM
|
2
|
1
|
1387
|
|
POST
|
Maybe try Minimum Bounding Geometry - Convex Hull? http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000003q000000
... View more
07-20-2015
12:27 PM
|
1
|
2
|
2086
|
|
POST
|
If you have an advanced license, you can use the feature to polygon data management tool.
... View more
07-20-2015
12:22 PM
|
0
|
4
|
2086
|
|
POST
|
I used !shape.area@acres! and it returned the proper acreage for my polygon features.
... View more
07-20-2015
09:00 AM
|
1
|
0
|
1240
|
|
POST
|
My only other thought was trying to convert labels to annotation then rotating the annotations. I hope the other solution works for you though
... View more
07-20-2015
07:50 AM
|
0
|
0
|
1178
|
|
POST
|
I'd make sure that the file path for the shapefile is not too long and contains no spaces, these can prevent ArcGIS from writing files to a location. Try saving to a short file path(C:\) and see if that could be the problem
... View more
07-20-2015
07:47 AM
|
1
|
1
|
1242
|
|
POST
|
arcgis desktop - How to rotate labels using ArcPy? - Geographic Information Systems Stack Exchange
... View more
07-20-2015
07:43 AM
|
0
|
1
|
1178
|
|
POST
|
I would make sure you are getting the correct layer with layer = arcpy.mapping.ListLayers(mxd, "")[0]. It seems like you are returning a layer that doesn't support layer.showLabels, which is what is crashing it. You do a good a job checking it for the for-loop but don't check again after it when you put in layer.showLabels = True. If the layer it accessing doesn't support it, it will crash. Try commenting out everything after: layer = arcpy.mapping.ListLayers(mxd, "")[0] and then adding print layer.name Perhaps you aren't getting the layer you think you are getting
... View more
07-17-2015
01:17 PM
|
0
|
2
|
1361
|
|
POST
|
That would not be the case. Your path is changing each time your for loop runs, based on which file you are using(a list which is being iterated through with enumerate), whereas layers is a list that is NOT being iterated over. Therefore, to get the proper item out of the layers list, you need an index equal to the iteration ([layers). path and symPath are strings created each time you go through the for loop based on the file(os.path.join returns a string not a list), so using an index on them would return the string characters of the index. I think you are being a little thrown off since in line 3 and 4, the second parameter is files, which while works for this, is not very pythonic. Both could be changed to file, since we are in a for-loop, and using the list we are iterating with an index instead of the item that is returned from the loop with the iterator. TBH, I have never used the enumerate function, though it works well for what you are doing. My python is not the strongest, I mainly use it only for use in arcpy, so perhaps a more "pythonic" person would like to explain this more succinctly (Xander Bakker, Richard Fairhurst, Dan Patterson, Wes Miller)
... View more
07-17-2015
11:59 AM
|
0
|
1
|
1976
|
|
POST
|
Ah, paths is a string not a list, so paths would give you the first character of the string paths (or the letter V in this case). Take away the index from paths in that tool and it should work.
... View more
07-17-2015
10:56 AM
|
0
|
4
|
1976
|
|
POST
|
I would use print statements for every parameters being used in lines 29-32 to make sure they are all correct, since almost all the rest of your values are hard coded into your script.
... View more
07-17-2015
10:12 AM
|
0
|
6
|
3139
|
|
POST
|
I think one of your file paths is getting truncated and just the first letter of the file is being used for a tool input, which isn't a valid dataset. Did you get which line the error occured on? You might want to debug using some print statements to make sure all your tool inputs are the values you think they are.
... View more
07-17-2015
09:34 AM
|
0
|
8
|
3139
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-22-2017 08:58 AM | |
| 1 | 10-05-2015 05:43 AM | |
| 1 | 05-08-2015 07:03 AM | |
| 1 | 10-20-2015 02:20 PM | |
| 1 | 10-05-2015 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|