Skip navigation
All Places >

python snippets

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

Recent Activity

martinschaefer
Hi,    I've found in a couple of examples that using gdb as output in python toolboxes is much slower than standard files or shapefiles. Running in ArcPro 2.0.1   Toolbox that has a function that needs arcpy.sa.sample output for further processing. output sample results to .dbf, read back into a dataframe, delete dbf - 6.5s output sample… (Show more)
in python snippets
n.ueberschaeresri-rw-esridist
I wrote a tool script using python that collects a couple of feature classes (from different Feature data sets in the same gdb) as several GetParameterAsText.  When I now want to start editing I figured out that it requires to address the gdb and not the Feature data set (or the feature class). But all methods I found until now refer to the… (Show more)
in python snippets
griner
I don't understand when an input argument to an arcpy function that says it takes a layer as an input but it really only works when I give it the name of the layer. Specifically: I use the arcpy.mapping.ListLayers() function to get a list of all the 'layers' in my mxd. I then search through this list to find the layer for which the .name value of… (Show more)
in python snippets
sunil_k
hello.. i am using arcgis 10.2 and i want to create a standalone annotation feature class in a gdb using arcpy..i have read in the blogs that an annotation feature class can be created by linking to any geometry feature class.Need help...
in python snippets
n.ueberschaeresri-rw-esridist
I am replacing square brackets by round brackets with help of a python script - works perfectly.  But I also want to replace a single word by another word (Cruise -> Campaign): nothing happens.    Here is the part of the script:    r = csv.reader(t, delimiter="\t") all=[] header=r.next() #arcpy.AddMessage(header) for fields in header:… (Show more)
in python snippets
psrapsar
Hi ,   I need to find if the given lat, long point is falling under a SDE Polygon featureclass or not using arcpy. I am using SelectLayerByLocation_management. But, it is running slow (4 sec). I need to make this as fast as possible (in milliseconds).   Can anyone help me?
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
behClevest
Using following ArcPy snippet, I am able to get Extent of current map   import arcpy  import arcpy.mapping  ## Sets the MXD file  IMXD = arcpy.mapping.MapDocument("CURRENT")  ## Sets the Dataframe  DF = arcpy.mapping.ListDataFrames(IMXD, "Layers")[0]  print DF.extent    as: 417939.472327849 241487.977474999 477757.540444938… (Show more)
in python snippets
n.ueberschaeresri-rw-esridist
I didn't really know how to word my question in only a few words for the head line... Let me try to explain my problem:    I have a script that attaches .png files to point features. The idea is to have those files matched to the point that have the same UID as the point.    def AddAttachmentsToUid():    … (Show more)
in python snippets
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
Load more items