696 reputation
411
bio website
location
age
visits member for 3 years, 10 months
seen 25 mins ago

Nov
13
comment Calculate field in model builder using file name
oh, then you probably need to wrap it in quotes so python treats it as a string, instead of a variable name. "%Name%"[3:]
Nov
13
answered Calculate field in model builder using file name
Oct
31
comment Make a polygon out of a polygon's hole?
What software are you using to attempt this?
Oct
30
answered Trouble inserting name of feature in TOC into attribute table using arcpy.calculateField
Oct
30
awarded  Yearling
Oct
30
answered ArcPy SearchCursor getValue leads to NoneType object has no attribute lstrip?
Oct
30
comment Referencing fields in code block of Field Calculator in ArcGIS for Desktop?
I should have figured MapNumber might not be a string field. You can just change it to... + "|" + str(map_number) + ".tif"
Oct
30
answered Referencing fields in code block of Field Calculator in ArcGIS for Desktop?
Oct
30
comment arcpy.mapping.ExportToTIFF fails to render layer?
Is the raster that is not displaying in the same coordinate system as the dataframe? Also have you tried ExportToPNG, ExportToPDF or ExportToJPEG with similar results?
Oct
30
comment arcpy.mapping.ExportToTIFF fails to render layer?
Have you tried adding a time.sleep(60) to make it wait a minute between opening the MXD and exporting? I'm not sure if the processes are asynchronous, so maybe it's drawing in the background while you export. Easy to try at least.
Oct
27
answered Maximizing Code Performance for Shapely
Oct
2
answered Select Layer by Attribute: SQL and variable problems
Oct
2
answered Is there a way to save Geoprocesing results?
Oct
1
answered Use updatcursor to replace values in multiple fields
Oct
1
comment Use updatcursor to replace values in multiple fields
Try printing out the fields parameter you're getting from arcpy.GetParameterAsText(3). I may be wrong, but if you select multiple fields, you'll get "field1;field2;field3" as a string. What Update Cursor is expecting is a python list of fields. Use fields = arcpy.GetParameterAsText(3).split(';') to get an actual list. However, that's going to reveal another problem - buildWhereClause will only accept one field name, not a list of field names. As Baltok mentioned though, we're going to need error messages.
Sep
10
answered If/then Field Calculator
Sep
10
comment 'List indices must be integers not tuple' Error
Cool. I edited my answer to include the "*" param for anybody else looking at it.
Sep
10
revised 'List indices must be integers not tuple' Error
edited code based on user tay bro's findings that second parameter of SearchCursor is required.
Sep
10
comment 'List indices must be integers not tuple' Error
Edited my answer. arcpy.da.SearchCursor returns a tuple, not a row object like the old arcpy.SearchCursor returns. I'm still on Arc 10.1, so I haven't used the da module at all.
Sep
10
revised 'List indices must be integers not tuple' Error
arcpy.da.SearchCursor returns a tuple, not a row object like the old arcpy.SearchCursor returns. I'm still on Arc 10.1, so I haven't used the da module at all.