Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live
↧

Python Code for Setting Obtained from Tool property

Is is possible to set the Obtained from property for a parameter in Validation using python code? I have populated a string parameter with a list of tables selected in Table View parameters. If the...

View Article


Date Field Conflict w Feature Class to Feature Class Conversion via Arcpy

I recently built a model in model builder that converts a feature layer joined to a table into a new feature class. While everything appears to work smoothly when ran the model via the model builder, I...

View Article


Iterate a script that calls to an .exe for variables?

I have a tool that I would like to run on each file in a folder. The tool runs in arcmap and is a python shell that concocts a command line command that then calls to an .exe. Is there a way to hard...

View Article

mosaic to new raster - how to mosaic rasters in different directories

Hi all, Can anyone help with figuring out how to list multiple rasters that are each saved in different folders for using within the mosaic to new raster tool? Can't figure this out after much...

View Article

Python shapefile List for geoprocessing

Hi, I have a python script where the user adds 10 shapefiles or geodatabse features that could be anywhere. Then each of the 10 shapefiles/gdb features are run through a few different tools (buffer,...

View Article


Split line at point using Python without ArcInfo license?

Hello There I just started learning to use Python for this GIS project. I have 100+ lines to split at many points on each of the lines. I want to use Python for this. ESRI webpage says the Split Line...

View Article

Image may be NSFW.
Clik here to view.

Problem writing to file geodatabase other than default.gdb

I have a script that selects parcels within a boundary and then runs a dissolve on those parcels. I have a file geodatabase that I want to use for the output. If I have my workspace set to my...

View Article

Cannot get field calculator expression correct

I am looking to calculate "ID" field w/ the last character of input fc along with OBJECTID value. Instead I receive the value of "1" for each record of "ID" in the output? Code:     fclist =...

View Article


Calculate Geometry Automatically

I figured it out. Can someone delete this.

View Article


arcpy - add/load entire feature dataset to mxd

Hi everybody, is there a way to use arcpy to load an entire feature dataset (e.g. a roads layer together with its topology layer) into a mxd-file? I know I can do it with drag and drop or via the "add...

View Article

how to make a list of features constructing the dissolved feature?

I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that. arcpy.Dissolve_management(self.address_cor_layer2,...

View Article

List Folders from ToolValidator

Hi all, I am trying to learn how to use the ToolValidator to modify the behavior of my script parameters. I've been using the ESRI help menus and other information I've found online as a reference, but...

View Article

Error using SearchCursor to export values to text file

I have created a very basic script (with the help of others) that uses a searchCursor to pull data from a feature class and, in theory, add that data to a text file. I think I almost have it but I am...

View Article


prepend a vertex to a linear feature to the begin measure of another linear...

I need to add a vertex to the beginning of a linear feature, or prepend a vertex from the beginning of a line over to the begin measure of another linear feature. Or alternatively, join these two...

View Article

QA QC log for excel export to email using python

I am still very new to python and very much learning on the fly. I am trying to create and email a excel spread sheet of various layers in a SDE db. I am doing this because we have multiple users...

View Article


Creating buffered rectangle for single point

I am creating a 200m buffered rectangle around a selected feature layer of points. Sometimes tere are many points, in which case I appear to create a correct rectangle. However, if there is only one...

View Article

Publishing python toolbox script

Hello, is there any web, where can I publish my python toolbox script? Something like ArcGIS scripts or so? Thanks for help and for tips!

View Article


Image may be NSFW.
Clik here to view.

arcpy.RefreshActiveView

Morning all, I am trying to put together a script that automatically updates the active table in Data Driven Pages. I found the script from one of the user groups on here and I think I have managed to...

View Article

SelectLayerByAttribute issue

I have had issues whereby a SelectLayerByAttribute CLEAR_SELECTION and NEW_SELECTION is producing "The value cannot be a feature class" messages. I googled this and found that I should make my class a...

View Article

AttributeError: 'module' object has no attribute 'utils'

We're getting this error periodically. Out of hundreds of successful requests it'll happen about twice. {"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.:...

View Article
Browsing all 2485 articles
Browse latest View live