|
POST
|
If your example works you can turn scripts into tools and use it in tool box or model builder or you can use tools as scripts just look at the documentation for the tool
... View more
09-15-2015
05:53 AM
|
1
|
0
|
921
|
|
POST
|
Joseph, like Darren Wiens says this may be a good time to think python you could then construct a list of the feature classes to merge at the end.
... View more
09-15-2015
05:40 AM
|
0
|
0
|
1704
|
|
POST
|
I think i see it now does your merge correspond to the results of your final iteration? If this is the case you may have to set a precondition for your merges to the final iteration(i'm not sure how to do that part) or you could create a separate model that does the merge after the original model finishes
... View more
09-14-2015
01:33 PM
|
1
|
2
|
1704
|
|
POST
|
Once you've added the code to your script you'll need to fix your tool to show your changes. Right click your tool in catalog and select properties then set your tool like below you may need to remove and reload into your model
... View more
09-14-2015
01:29 PM
|
2
|
1
|
4630
|
|
POST
|
Add this code to your script in your tool set a variable as derived and as text import arcpy
dvariable = "Dummy"
arcpy.SetParameterAsText(0,dvariable)
... View more
09-14-2015
01:03 PM
|
0
|
3
|
4630
|
|
POST
|
You may have to export your model to python and put your update cursor script in, where you need it to go or change your script to have a dummy output that you could use for preconditions.
... View more
09-14-2015
12:41 PM
|
0
|
5
|
4630
|
|
POST
|
Does your script have any input output variables you could then set the precondition of the process following the script to wait for the script.
... View more
09-14-2015
12:31 PM
|
0
|
7
|
4630
|
|
POST
|
Try setting your preconditions. A quick tour of using preconditions—Help | ArcGIS for Desktop
... View more
09-14-2015
12:19 PM
|
0
|
9
|
4630
|
|
POST
|
Here is how I'm using field mappings for my street index creator hope this helps http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/fieldmappings.htm # Create a new fieldmappings and add the two input feature classes.
fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(DissolvedStreets)
fieldmappings.addTable(InputGrid)
jField = fieldmappings.findFieldMapIndex(gridField)
fieldmap = fieldmappings.getFieldMap(jField)
fieldmap.mergeRule = "join"
fieldmap.joinDelimiter = ","
fld_length = fieldmap.outputField
fld_length.length = 255
fieldmap.outputField = fld_length
arcpy.AddMessage(str(fieldmap.outputField.length))
fieldmappings.replaceFieldMap(jField, fieldmap)
# Process: Spatial Join
arcpy.SpatialJoin_analysis(DissolvedStreets, InputGrid, outfc, "#", "#", fieldmappings)
... View more
09-14-2015
11:55 AM
|
0
|
0
|
2729
|
|
POST
|
Yes you are correct. It is a string representation, in my case i'm passing 'url?'+'Street=' + address + '&outFields=&maxLocations=&outSR='+str(src)+'&searchExtent=&f=Json' to a published geocoder and getting the x,y to determine if the user is in or out of ball districts(soccer, baseball)
... View more
09-14-2015
11:26 AM
|
2
|
2
|
2597
|
|
POST
|
I did one using the following code(async) import urllib
import json
URL = 'your/url'
result = urllib.urlopen(URL).read()
addrData = json.loads(result)
... View more
09-14-2015
11:06 AM
|
2
|
4
|
2597
|
|
POST
|
Did you clear anything selected? It sounds like to me that you have something selected or not all you want is selected.
... View more
09-14-2015
06:38 AM
|
0
|
4
|
1704
|
|
POST
|
Is this something you'll need to do more than once? A topology may be the better route.
... View more
09-14-2015
06:07 AM
|
1
|
1
|
3940
|
|
POST
|
Try searching for arcpy.da.UpdateCursor that will get you where you want to go
... View more
09-14-2015
05:26 AM
|
0
|
0
|
2921
|
|
POST
|
import arcpy
fc = "Your Feature Class"
desc = arcpy.Describe(fc)
oidfld = desc.OIDFieldName
fld = arcpy.AddFieldDelimiters(fc,oidfld)
print oidfld,fld
with arcpy.da.SearchCursor(fc, ("OID@")) as cursor:
for row in cursor:
tmplyr = "tmplyr"+str(row[0])
#You could create a list of features here to input below
query = fld + " in (" + str(row[0]) + ")"
arcpy.MakeFeatureLayer_management(fc,tmplyr,query)
... View more
09-10-2015
12:48 PM
|
0
|
0
|
3546
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 09-14-2015 01:29 PM | |
| 1 | 01-26-2016 10:18 AM | |
| 1 | 08-18-2015 06:01 AM | |
| 1 | 06-20-2016 12:34 PM | |
| 1 | 01-19-2016 06:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|