Output won't reflect updated records in Input
Hello all, I am a newbie in Python and have a simple script that does a spatial join on two feature classes (inputfc1) and (inputfc2) and overwrites the output (outputfc) every time it runs. But I...
View ArticlereplaceDataSource working on single mxd, but not multiple.
Im very new to Python, and Im trying to write a script to trawl through a folder of mxds and replace an incorrectly named dataset. I have a script that works on a single map document (below) Code:...
View ArticleHow to get selected riever segment from "TraceGeometricNetwork_management"
Hi is it possible to get just selected segment of river network?I am using "TraceGeometricNetwork_management" to find upstream accumulation.. but output is just name of the group layer. ? thank a lot
View ArticleBug with TIN properties (arcpy) ?
Hello everyone, I'm stuck with an annoying error, when I try to make use of TIN properties in the Python window in ArcCatalog, I have the following message: Quote: AttributeError: DescribeData...
View ArticleTranslate python label expression to VB
First off, I'll admit I do not know much about VB. A while back I found that there is a bug with exporting maps that have "advanced" python expressions to PDF programmatically (i.e. doing this through...
View ArticleGeoreferencing with Python?
Is it possible for me to georeference a CAD file in ArcMap using Python? I know the projection, rotation angle, the X and Y shift distances, and the scale value.
View ArticleCan't Install setuptools 0.9.7
I'm stumped by my inability to install setuptools 0.9.7 on Windows 7,64, python 2.7.2. On running ez_setup.py I got the error: Code: Downloading...
View ArticleDo I need to be in a edit session to use the Insert Cursor?
I am inserting rows in a table, but it only works if I am in a edit session. However all the examples I see are not in an edit session. How can I have an insertcursor without an edit session? if I have...
View ArticlewhereClause syntax error
All, The script is almost complete. I am attempting to have the user input the six values as strings, then the script selects and zooms to feature. I am running into a syntax error within the...
View Articlecopy text files to multiple directories using python
I am trying to copy text files to various directories that are listed in a text file but keep getting errors, can anyone assist please ? Python script below: and I have attached my text file import os...
View ArticleToolValidator Class - New methods allowed?
Has anyone tried adding new methods or classes to the ToolValidator code for a Python script tool? I wanted to call another function from 'updateParameters' and use the return values to populate one of...
View ArticleSimple random polygon question
Hi Everyone, Is there a way to create random polygons in ArcGIS or by using python. I am trying to finish my masters and my advisor wants me to create simple random polygons to make test data, but I am...
View Articledelete multiple field using python
Hello System Windows Vista / ArcGIS 9.3 I have ten shape files. Each of them has the fields starting with D in the attribute table. (D8739, D1983) Some have 10 D fields, and other have about 20. Now I...
View ArticleMosaic to New Raster
Hi all, I'm having some trouble; I'm trying to use the mosaic to new raster tool but it keeps failing on me. It doesn't seem to be able to recognise the the input rasters (tiffs). Here is the code I'm...
View ArticleExecute Sql Statement in SQL Server 2008 with ArcSDE connection
hi, i'm trying to execute this SqlStatement to establish an sql query in sql server 2008 with an arcsde connection (arcsde personel use) but there is no result. the sql statement is : Execute SQL...
View ArticleImport Arcpy error
Hi everyone, I've searched the forums and the internet for an answer to this, but unfortunately I've had no luck. I'm running Arc 10.1 sp1 Regardless of whether I use Idle, pythonwin, pyscripter or the...
View ArticlePython toolbox - run tools sequentially
I have two tools in my Python toolbox. I wonder is it possible to make the dialog box of the second tool appear automatically after closing the dialog box of the first tool?
View ArticleArcpy.mapping question
Hi all, I'm having a bit of trouble with this. I'm trying to run a Python code in Pyscripter which at the end select a number of featureclasses in a gdb and adds them to a mxd that I select. The code...
View ArticleI want to create a folder using an attribute value from a feature
This is my code and the error message received also Code: mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] fc = "Parcels" field = "StateName" cursor =...
View ArticlePython add-ins vs. .NET add-ins?
from (http://gis.stackexchange.com/questio...vs-net-add-ins) I found in ESRI .NET help: Python All ArcGIS Desktop applications include an embedded scripting language called Python. Many areas of...
View Article