Skip navigation
All Places >

python snippets

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

Recent Activity

AChapman@jmt.com_jmt
I am trying to join multiple fields using an update cursor, I want to trim a filed to a specific length while the cursor iterates through and adds another field to the final string. I am working with a streets data set and will need to do this for streets that have no pre direction and streets that have a pre direction. I want to take only the… (Show more)
in python snippets
JerryGarcia
It appears I keep losing my database connection?  I am looping.  The first 6 or 20 or so operations execute fine, but then it appears I loose the database connection?  There is a pause, then a rapid fire of errors.  Once it loses a connection, it does not recover.   Any suggestions?  Thanks!   testSQLCreatorConnection =… (Show more)
in python snippets
vikasm
(As part of my learning python in ArcGIS) I used the simple clipping tool and then I paste the "Python snippet" (below) in the python window within ArCMap.    arcpy.Clip_analysis(in_features="RI_Sewers", clip_features="Providence", out_feature_class="C:/EsriTraining/PythEveryone10_1/PythonInArcGIS/RhodeIsland.gdb/Sewers", cluster_tolerance="")  … (Show more)
in python snippets
c.molivadas_alexgis
How can I filter my DDP export based on features contained within the page extents?   I have a DDP project with 9000 pages, I use my building foortprint features to drive the index - I would like to determine which pages contain another certain feature like 'mailboxes'.  'mailboxes' don't occur on every page.  'mailboxes' are not the feature that… (Show more)
Stevenson_S15_uu_scobe
Hi folks, I've been stuck on this for ages. Hopefully someone might have some tips. I have some code to delete a .shp file.   arcpy.env.workspace = "C:/check" ws = arcpy.env.workspace in_data = "Folklore.shp" data_type = "" arcpy.env.overwriteOutput = True arcpy.Delete_management(in_data, data_type) arcpy.Delete_management('Folklore.shp')  … (Show more)
in python snippets
dogdaynoon
I am running ArcGIS Pro 2.0.0 on a windows 12 Server (not controlled by me). There is an automated python/arcpy script that runs every night that replaces some tables in a GDB. Until recently the script would run and use the credentials stored by ArcGIS Pro for startup to authorize license level. For some reason now the "Remember Me" option… (Show more)
in python snippets
nemobakr
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Chapter4Modified2.py # Created by Silas Toms # 2014 04 23 # --------------------------------------------------------------------------- # Import arcpy module import arcpy import csv arcpy.env.overwriteOutput =True Bus_Stops =… (Show more)
in python snippets
nemobakr
what is error in my python code in intersect tool i have buffer tool and want to intersect with the whole city the select tool worked and buffer tool worked and stop in intersect code this is my error in arcgis   so i think the last code in intersect code is wrong but i don't why please correct this code to me and give me advice thanks for your… (Show more)
in python snippets
Holisticbynature
So this was just a play tool idea I had, but I ultimately was not pleased with how I ultimately handled the inputs. The input is literally text, and I thought about remap tables or other objects but was not sure it was much better. I actually would like input or advice on an appropriate input past the solution I made. Code is revealed in the the…
in python snippets
jbrengel
Hi,   I created a script tool in ArcGIS using Python.   While the script tool is mostly functional, it does not complete the final step.  This step is as follows in the Python code (Note: the syntax highlighter doesn't seem to work correctly but I think the syntax is right): try:    # Add Parameters    outrast = arcpy.GetParameterAsText(7) #… (Show more)
in python snippets
Load more items