Skip navigation
All Places >

python snippets

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

Recent Activity

Dharmarajan
Dear All,   How to get the geometry which is available in ''Area of interest" layer (which is a part WorkFlowManager)  by using ArcPy for WMX?
in python snippets
Dharmarajan
Dear All,   How to get the extent of a layer(by using Arcpy) named "Area of interest"(it is a graphics layer) which is attached automatically when we open arcmap by using WorkFlowManager?
in python snippets
EMedina-esristaff
Click to view contentThese days, it is quite common for people to use the rasterio, rasterstats, numpy, or geopandas Python packages in their Raster processing/analysis workflows. This post aims to illustrate how some of these packages might be used to perform zonal statistics: rasterio rasterstats geopandas fiona   If you're ever used the Summarize Raster Within… (Show more)
in python snippets
brianmcleer
My goal is to list all indexes that are being used on each feature class in an SDE database with ~50 feature classes that reside, with the end product being a list of the feature class and what the name of the index is.    import arcpy arcpy.env.workspace = r"Database Connections\Server Database Login.sde" # Get list of indexes and print… (Show more)
in python snippets
simons.joseph
I am trying to build a series of arcpy Add-In buttons for ArcMap 10.6 that perform simple field calculations via da.updateCursor on selected annotation features in an ArcMap edit session. I have all the edit code working, however after an edit occurs, the standard Undo/Redo stack is not enabled and I need these edits to participate in the… (Show more)
in python snippets
Brittan.Battles
Getting the following error below when trying to edit a versioned feature class in an SDE database using a python script tool: Traceback (most recent call last): File "L:\Tools\Models\ReconcilePostCalcFields&RecreateVersions.py", line 32, in <module> for row in cursor: RuntimeError: workspace already in transaction mode   Code is below: import… (Show more)
Abhinav_Tummala
How to Add attachments of a feature along with attributes to PDF exported using arcpy in python.
in python snippets
SWebber
Click to view contentI am creating a label style that needs to contain three pieces of information from three attribute fields in the feature class. In the label expression, each field needs to appear on its new line, and one field [GW_Elevati] needs to appear in blue font.    In my first draft, I used only the &vbnewline& command, and it came out just fine. However,… (Show more)
in python snippets
vikshut
Hi. I am working on automating an image service publishing workflow in arcmap 10.6.   From the python window, I executed the following in sequence: CreateGISServerConnectionFile CreateMosaicDataset_management AddRastersToMosaicDataset_management CreateImageSDDraft   However, when I executed the following code, the raster function… (Show more)
in python snippets
Load more items