POST
|
Sorry, I did python not VB. Change "VB" to "PYTHON_9.3" and [TextString] to !TextString!.
... View more
12-11-2013
11:44 PM
|
0
|
0
|
220
|
POST
|
Try this:
arcpy.CalculateField_management(inTable, "Parcelid", "int({0})*10000 + int([TextString])".format(Folder_Name), "VB", "")
... View more
11-28-2013
11:50 PM
|
0
|
0
|
220
|
POST
|
ZonalStatisticsAsTable and joining the output to your polygons. (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000w8000000.htm)
... View more
11-28-2013
03:19 AM
|
0
|
0
|
344
|
POST
|
I guess, its no good idea to change a shp-file within a searchcursor using this shp-file. Maybe you should copy the shp-file and use the copy in the cursor:
shp = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten"
shp_copy = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten_copy"
arcpy.Copy_management(shp , shp_copy)
with arcpy.da.SearchCursor(shp_copy, ["GelaendeH"]) as cursor:
...
... View more
11-28-2013
03:10 AM
|
0
|
0
|
688
|
POST
|
Maybe you have to use a remap-object: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000sr000000.htm
full_remap = RemapRange([[0, 1.25, 100000],[1.25, 10, 200000]])
... View more
11-28-2013
02:56 AM
|
0
|
0
|
257
|
POST
|
Too much bangs I guess: arcpy.CalculateField_management(Table_A, Table_A + ".field_A", "!" + Table_B + ".field_B!","PYTHON")
... View more
11-28-2013
02:22 AM
|
0
|
0
|
308
|
POST
|
I never tried it, but maybe this helps: http://docs.python.org/2/library/smtplib.html#module-smtplib
... View more
11-14-2013
11:48 PM
|
0
|
0
|
1179
|
POST
|
Some calculate field examples: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002m000000 Search for "Accumulative and sequential calculations".
... View more
11-14-2013
05:47 AM
|
0
|
0
|
195
|
POST
|
check out logging: http://docs.python.org/2/library/logging.html
... View more
10-30-2012
02:42 AM
|
0
|
0
|
612
|
POST
|
These sites will probably help: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000 http://msdn.microsoft.com/en-us/library/aa226054%28SQL.80%29.aspx So try (the parameter for varchar is the size of your text-field, maybe 50):
database.testing.PARCELS.PID <> CAST(PARCELS_SpatialJoin1.PID AS varchar(50))
... View more
09-27-2012
07:59 AM
|
0
|
0
|
617
|
POST
|
Please use the code-tags (#-Button in the editor) and show me more of the script. Is there an errormessage? What is curSort? The sort_fields-string needs the A or D for ascending or descending order, it cannot be equal the fields-string. Do you have fields for the coordinates or do you use the shape-field?
... View more
09-25-2012
05:22 AM
|
0
|
0
|
134
|
POST
|
sys.argv[0] is the name of the script. Your parameters starts at sys.argv[1]. So: sys.argv[1] == arcpy.GetParameterAsText(0)
... View more
09-20-2012
11:30 PM
|
0
|
0
|
796
|
POST
|
The inputs have to be strings (look at the examples): http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000002q000000 # Set the origin of the fishnet originCoordinate = "%f %f" % (pxy.X,pxy.Y) # Set the orientation yAxisCoordinate = "%f %f" % (pxy.X,(pxy.Y+1))
... View more
09-17-2012
01:53 AM
|
0
|
0
|
747
|
POST
|
You could use a loop. Put your outnames and your query-statements in lists:
outnames = ["outfile1", "outfile2", ...]
queries = ["query1", "query2", ...]
for ii in range(len(outnames)):
arcpy.SelectLayerByAttribute_management(... outnames[ii] ... queries[ii] ... "NEW SELECTION")
arcpy.FeatureClassToFeatureClass_conversion(...
Sorry, i have no more time, but maybe this shows you the way.
... View more
09-14-2012
08:00 AM
|
0
|
0
|
152
|
POST
|
ListFields() returns a list of field-objects. You need the name-attribute: arcpy.AddMessage(str([field.name for field in arcpy.ListFields(inMemInt)])) Try pprint: import pprint outstring = pprint.pformat([field.name for field in arcpy.ListFields(inMemInt)]) arcpy.AddMessage(outstring) Try (I did not test it): http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00s500000033000000 '"AGADT2005" * "Shape_Length"'
... View more
09-14-2012
07:50 AM
|
0
|
0
|
1278
|
Title | Kudos | Posted |
---|---|---|
1 | 03-02-2012 12:30 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|