Skip navigation
All Places >

python snippets

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

Recent Activity

Hi,   I have an error while trying to automatize the creation of an address locator. Any idea what can be wrong in my code below?   I only use 1 data table as reference so why this error?   I am using arcpy v10.6   import arcpy arcpy.env.workspace = "C:\\Script\\Connexions\\connection.sde\\MyDataSet" configs = {    … (Show more)
Hi All, In Arcobjects, by using IGeoProcessor2 interface, we can add&invoke the customized Arcpy tools. Similarly, is there any option is available in Arcpy to execute the customized Arcobjects tools? Kindly clarify.
in python snippets
ArcGIS custom toolbox which uses a python script, for updating a mass amount of field aliases at once, using a list of field names and corresponding aliases input by user. Let’s say you have an ArcGIS feature class or table with a bunch of cryptic, abbreviated field names, and you want to add aliases to make them easier to understand. Let’s say…
in python snippets
Has any one tried automating updates patch to arcmap desktop on several instances?
in python snippets
Novice in python. Have tried several expressions but can't seem to strip the words 'Branch' and/or 'Library' from a field of names...some names are "[name of city] Branch Library" and others are "[name of city] Library". I don't want my labels to show either of these on the map because it looks too busy. Some of the city names contain the string… (Show more)
in python snippets
I am currently responsible for updating layer data sources within mxds after an Oracle password change takes place.  To do this I have put together a Python script that goes through a folder (designated by the user), finds all of the .mxd files, and one by one reads in the layers of each mxd (arcpy.mapping.ListLayers), checks the workspacePath of… (Show more)
Hi,   I run python script using following code desc = arcpy.Describe(fc) sindex = str(desc.hasSpatialIndex) stype = desc.featureType print str(fc)+ "--"+sindex + "--"+stype   it returns the feature class name and type correctly.  but it doesnt return the correct value for hasSpatialIndex. It returns the values as true when the ArcCatelog… (Show more)
in python snippets
I'm trying to get a script to reset the paths of data sources from an archive path to a current path. However, the script is only changing one of the paths and not all of the paths. Here is my code: import arcpy, os arcpy.AddMessage("\n\n" + "Re-source MXDs was developed by Carl Beyerhelm, modified by Steve Kovach" + "\n") mxdFolder =… (Show more)
in python snippets
Click to view contentI am a computer science student and I working on this project; Goal: Python script to publish hosted feature layer to AGOL from a geodatabase. To eventually move features to Open Data. I am referencing my arcpy object to a Pro project in which lives a gdb file. I store the list of items from the gdb into a list called lyrList that is sent to my… (Show more)
in python snippets
Load more items