Skip navigation
All Places >

python snippets

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

Recent Activity

nbanerjee
Click to view contentHello,   I have a Python expression that utilizes a code block that I am trying to run as a field calculation (manual or with Field Calculator geoprocessing tool).  The code runs without issue, but returns nulls even if I hard-code the return value to a simple string.  I have tried going through line by line to better understand where/why it is… (Show more)
in python snippets
thanes65
See question above.  So far script does this, have script or know how to do anything with a # in front of it #user loads shapefile and either selects features or uses entire shapefile   # run a bunch of tool snippets   # create and calculate fields   # split polylines, densify @ 10ft, create vertices,    # create points at start… (Show more)
in python snippets
silentcortagrapher
Click to view contentHello,   I have a question about how to generate buffers shaped as partials circles with different radii – I am particularly interested in scripting out this method with ArcPy as our current (limited) approach is scripted out, which saves project time.   For context, I am working NOAA hurricane data that has wind radii data values that extend in… (Show more)
in python snippets
EgbuleI
Click to view contentI recently replaced my existing data server with a new server thus a new server name and path. My existing data server is named skunk while my new server is tesclon. I need to reroute all the datasources in my over 300 mxd files that points to skunk to now point to Tesclone.     The script has been modified and some print statements were used to… (Show more)
in python snippets
MatthewLeonard
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
brianmac1313
I am having issues getting a field calc script in arcpy to run. It's probably my parameters, but I can't seem to find the error. Please see below. I am 'ranking', one shapefile based on multiple columns (with weights applied). My goal is to import it as a script into a toolbox so a user doesn't have to use arcpy.   Thanks in advance!   Edit:… (Show more)
in python snippets
LTS_JChamorro
Click to view contentI'm having the hardest time coming up with a Python expression to calculate fields based on multiple conditions. I need to be able to associate a material code to a feature that meets two specific conditions. For example: The logic I'm trying to use is: if CATEGORY_NAME == TAIL AND Calculated_length < 500 equals MATERIAL_CD =  "10835549"… (Show more)
in python snippets
DemersM
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)
Dharmarajan
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
Load more items