Batch Clip Process
Hi all, I am using below code to clip numbers of feature from Dan Patterson; #BatchClipFCs.py # #Author # Dan Patterson # Dept of Geography and Environmental Studies # Carleton University, Ottawa,...
View ArticlePopulate a field with Python in the field calculator using a list.
Dear all, I would like to create a modification of this code: rec=0 def autoIncrement(): global rec pStart = 1 pInterval = 1 if (rec == 0): rec = pStart else: rec += pInterval return rec Because I need...
View ArticleFeeding Variable into arcpy.CreateAddressLocator_geocoding
I have had a lot of success feeding variables into data paths for all other geoprocessing tools (this needs to be in the design so the script can be passed around different systems without modifying...
View ArticleI need help about updatecursor,thanks!
I want to delete the row which ZQBM field contains 331122001. any ideas, thoughts? i would gratefully appreciate it. import arcgisscripting gp = arcgisscripting.create(9.3) gp.workspace =...
View ArticleList Index Out of Range?????
Can anyone tell me what "List Index Out of Range" means?? Thanks!! Code: import arcpy, traceback from arcpy import env mxd = arcpy.mapping.MapDocument("CURRENT") # Join Fields fc =...
View Articleclose wxPython main frame within python addins
I have created a dialog box class (frame with couple of comboboxes -- shown only one below as an example) and calling it from a different class. The problem lies in closing the frame once i retrieve...
View ArticleDetermine Flow Accumulation GRID: Using Python; Map Algebra and NumPy
I'm currently busy with a hydrology study where I'm determining the location and structure requirements (culverts & bridges) for a proposed Railway Alignment. My initial assessment is based on the...
View Articlearcpy.ListSubtypes is not working
Hello, I am following ESRI Documentation link 'http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000021000000' to print the details of subtype associated with a feature class but for...
View ArticleUsing decorators for script tool interfaces?
I saw a neat example this morning of Python decorators that made me think: could this be a nice way to set up a script tool interface for functions? The way I set up tools now is as functions (so I can...
View ArticleExploring dbase with python script
Hi all, I've got a question and hope someone can help me. I've got two dbase (.dbf) which are looking like this: dbase 1: ID usage shape_area 1 living 50 dbase 2: ID usage shape_area 1 living 50 2...
View Articlelink arcmap to excel- a button required
hello averyone. i have an application in arcmap, in which point locations are added in arcmap thruogh geoprocessing model, which is customized as a buttion and just one click load the locations from...
View ArticleprojectAs help
I'm attempting to implement some of the functionality found here: http://support.esri.com/en/knowledge...s/detail/40730 I need to acquire the x/y values where mouse click occurs, convert the values...
View ArticlePython Schedule task not running because of arcpy.
Hi everyone, I have this really simple Python script, that basically copies a file: Code: import os, shutil, time originalSDDraft = "C:\\Esri\\test.sddraft" localtime = time.localtime(time.time())...
View ArticleTool Validator / Values List Help
All, I am trying to populate a Values List in a tool from selected features. I have 2 feature classes (Counties and Places). I am trying to narrow down the Placees that will populate the Values List. I...
View ArticleAddLayer
I am trying to add a layer to the table of contents. In other words I want to be able to open ArcMap, open a toolbox I created and run a script that I wrote (which creates a layer file), and add that...
View ArticleText file as input (multiple) fo Reprojecting Images
Hello All, I am new to Python and generally struggle with even simple scripts. I have a list of images in different directories. I want to reproject them bulk using python. So first, I tried to open...
View Articlearcpy.da.searchcursor with expression
Just wondering if anyone has had any trouble with using a query expression with arcpy.da.searchcursor? I've used this successfully many time but I have code where I create table views from tables in a...
View ArticleAdd-in toolbar- ArcMap won't start, uninstall manually?
I've created a basic add-in toolbar using Python. It compiled fine, installed OK but now I can't start ArcMap, ArcCatalog etc- It loads the splash screen but then stops (no errors are raised) so I wish...
View ArticlePass selected text element as parameter
Hello, I'm wanting to create a script to convert the text in a selected text box to all caps...I know how to cycle through all TextElements / select an element based on its text value, but I cannot...
View ArticleArcpy changing current working directory
I can't seem to understand the following behaviour: Code: mxd = ur'G:\MapImageCreator\ImageTaker.mxd' print os.getcwd() # C:\Documents and Settings\dabkowsk\Desktop (where I...
View Article