Skip navigation
All Places >

python snippets

Log in to follow, share, and participate in this socialgroup.

Recent Activity

MTCGIS
I'm working to develop a python script which merges two feature classes into one. I found the following arcpy example quite helpful, however it's only provides an example of how you might approach the problem of mapping input fields with different names and logically similar content for 1 input field from the 2 feature classes. My issue is that I… (Show more)
in python snippets
HalinaLewandowski
I'm trying to delete all features from the SDE layer that has topology... the script fails on the arcpy.DeleteFeatures...  ERROR: arcgisscripting.ExecuteError: ERROR 999999: Error executing function. A class in the topology necessitates validation being run within an edit session. [county.GIS_SDE.BldgInsp] Failed to execute (DeleteFeatures).  … (Show more)
Mick_D@ll@s
I'm trying to create a script that will traverse through a giant attribute table (comprised of the records of 68 polygons), and total up the values in a particular field for features within each polygon.  I want the script to go through the table, look for polygon 1 records, add all values in the "Grand_Tota" field, the move on to looking for all… (Show more)
in python snippets
curtvprice
see http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000066000000 would be nice to have the option of removing ALL joins from a table or feature class programatically just like you can from the GUI instead of having to remove them individually. Instead of passing in the name of the join as a string, use a '*' or '#' to… (Show more)
TinaEsri
When I run >>>arcpy.Near_analysis("ACN_Select","Derden","150 Meters", "NO_LOCATION", "NO_ANGLE","PLANAR") in the python window in ArcMap 10.4, it returns the correct numbers in the field NEAR_DIST. However, if I run the same in PyScripter: import arcpy arcpy.env.workspace = "C:\\Geoplay\\GLO\\Output.mdb" arcpy.env.overwriteOutput = True if… (Show more)
in python snippets
ramaz65w
Automating the Publishing through arcpy scripting and modifying the properties of the SDDraft by xml parsing. Able to change most of the properties but when running the script for recycleInterval property I'm getting this error :   if key.firstChild.data == 'recycleInterval': key.nextSibling.firstChild.data = 1 AttributeError: 'NoneType' object… (Show more)
in python snippets
donaldsonk
Hi I'm looking for a python script to populate an ID field in ACRGIS 10.2 with a sequential number that resets when the value of site field changes. e.g. Site      ID SIte A   0001 Site A   0002 SIte A   0003 Site A   0004 SIte A   0005 Site B   0001 SIte B   0002 Site B   0003 Site C   0001 SIte C   0002 ...           ..... I've… (Show more)
in python snippets
behClevest
  I need to add all features within a dataset called MainSt in a file geodatabase which is stored at following directory C:/Temp/Roads.gdb to current map. using following code I am able to add them one by one but can you please let me know how I can loop and add them dynamically     mxd = arcpy.mapping.MapDocument("CURRENT")     df =… (Show more)
in python snippets
Load more items