List Anomaly
So I'm trying to export a subset of a DDP setup. Print statements are just for debugging purposes: If I do this, it works out fine: Code: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT")...
View ArticleModifying Python script to work in a toolbox
I am new to python scripting and began by creating a specific tool. The clip works well in either PythonWin 2.7 or ArcToolbox 10.1. Now, I want to modify the script for any feature class. How would I...
View ArticleCount is showing zero
I would like to select records based on one field of the highest OBJECTID value. So I am first creating the selection of the highest OBJECTID to obtain the value CountyFFY for that record. Then I am...
View ArticleHow to use +"AND"+?
I am trying to get the records with 1 or 2 in field A, and at the same time 3 or 4 in field B. When constructing the whereclause I used: "import arcpy...
View ArticlePython Button Add In, onClick function
Hello, I am trying to get a simple python code of when I click the button on my combobox toolbar, the button will direct the user to the next page in my Index(Map sheets). This is my full code. I am...
View ArticleError 999999 while renaming raster.
Hi, I keep getting error 999999 while trying to rename a raster. The code is below. Any advice? Code: for raster in arcpy.ListRasters(): Â Â #raster_name_check= raster[40] Â Â if len(raster)>=40:...
View ArticleHow do I select folders that contain a certain names within its title using...
Using Python, How would I select all folders within a directory tha contain certain charectes within its name using python, Example: select all folders that have Parks within C:/GISDATA Parks CLVParks...
View ArticlePython Code Assist!!!
I'm trying to check for the existence of data within a particular attribute field in a given shapefile. Below is the code I'm working with (on model builder) which I know needs major debbuging...but...
View ArticleIterartor with for to inetrpolation.
Dear all, I have a problem with interpolation the data. I have the data at some rainfall stations content the timeseries. I need to distribute by using the interpolated method like IDW, Kriging,...
View ArticleSQL in Python where statement using LIKE
Hi all, I'd like to construct a SQL statement for a search cursor using a LIKE with a wildcard instead of an =...but I'm having some difficulty as I find SQL in python with all it's backslashes,...
View ArticleSorting before continuing
I am interested in sorting via an attribute before running my script. Currently I am trying to use an update cursor: arcpy.gp.UpdateCursor (in_dataset,"","","", "attribute D") It does not appear to...
View ArticleQuestion regarding versions and changing data sources
I'm writing a script to change data sources for multiple layers in an mxd from one state-plane zone to another. The database is an sde connection which I am using as my workspace. The structure of the...
View Articleda cursor behaviour on layers with where clause
I can't seem to find any reference to this in help or forums, but it seems a da cursor cannot apply a where clause to a layer with a where clause already applied. Does anyone know if this is this...
View ArticleExporting data from a shapefile into 2 related tables
Hi Everyone, I'm trying to find a solution to a new issue we now have since converting our tables to SDSFIE 3.0 Gold standards. Basically, the issue is that all feature classes that we once had are now...
View ArticleFrom arcpy.SearchCursor and arcpy.UpdateCursor to arcpy.da.SearchCursor and...
I wrote code using the arcpy.searchCursor and arcpy.UpdateCursor but want to switch to arcpy.da.SearchCursor and arcpy.da.UpdateCursor. I tried to change it but I get an error message in the lines...
View ArticleAlmost there, but I need help finding a bug
Hi all, I'm having a problem with my code. It creates data driven pages from two seperate MXDs as left and right side page PDFs. Then it puts them together into one PDF. It used to work on my Windows...
View ArticleCreate a Related Record?
Hello! I have a relationship class set up between a feature class (Origin) and a table (Destination). The Origin Feature Class already contains records which were imported from the legacy data table it...
View ArticleAutomatisation of Arc-process in Python
Hi all, I'm kind of a newby in python, as I just started to use it for a project. For the context (might help...) : I'm trying to generate some shapefiels by different Selections on attributes and then...
View Article3D scatter plot in matplotlib
Hello, Is there any analytic description of creating a 3D scatter plot in matplotlib? thank you very much
View ArticleCreate a raster grid in vertical plane from xyz data
Hi I need to create a grid of the point dataset (image attached) and export as a .grd file so that it can imported into ArcScene. I am using python xy and mayavi library to visualise this data. If...
View Article