Flip subset of lines using arcpy.FlipLine_edit in a Python script
In a Python script I can't seem to get FlipLine_edit to work on a selected set of lines contained within a shapefile. Unfortunately, all of the lines are getting flipped instead of just those that are...
View Article10.2 Arcpy comboboxclass addin simple question
Hopefully this is a simple question, what variable is used to get the selection from this combo box? ie how do I use this in later code. I am not finding any good resources for arcpy addins. Code:...
View ArticleFinding multiple tables and setting them to a variable
There is something that just isn't right with this and I can figure it out. Here is the code: Code:  import sys, string, os, cx_Oracle, arcpy, datetime  LRName = "RSID_"+num  LRName1 = "RSID"+num...
View ArticleLoop in python with Zonal Statistics
Hi, I have following problem. I have a layer with thousands of objects - crowns. I have CHM (nDSM) with "height" values. I would like to calculate "All" height statistics for crowns based on CHM, crown...
View ArticleListing data in an SDE
I wrote the code below to list datasets and associated feature classes and shape types (point, polygon, etc.) in an sde. This works fine until I get to the last dataset, Zoning, which contains one...
View ArticlePython Scripting Problem
Dear Sir I want to replace "TextString" field attribute values with "Name_Sin" attribute values in an another table. for that I wrote a script to join two tables and calculate the attributes. But the...
View ArticleFTPlib datetime
I am experimenting a little bit with python. This is the code I wrote at the moment Code: import os from ftplib import FTP ftp = FTP('??????') ftp.login('??????','??????') ftp.cwd('USBDISK2-0-01')...
View ArticleCan't Disable Python Addin Tool in Toolbar
I can't get this code to grey out googletool when I switch to layout view. I have watched the video copied the example code in the help files and read about it. I must be missing something. I also...
View ArticleJoining a shapefiles attributes to a table in ArcGIS 10 using Python
Hi Experts, I am trying to join a shapefiles attributes to a table in ArcGIS 10 using Python. This is the code I have been using. What do the errors mean?? Why are error occuring? >>> import...
View ArticleHow can you sort a set of unique values? Arcpy addin
I have tried many ways to sort that work, but then I can't get unique values. The following works to return unique values, it would seem I need to add something to the onFocus part to make it work. any...
View Articlearcgis 10.2 python add-in, create new tool to popup message box and allow...
Hi Everyone, I am a newbie in the arcgis python add-in. Now I need to create new tool to popup message box and allow user input their request, how can I realize this? Thanks!
View Articleget list of highlighted features within a selection
Hi, from arcpy (in arcmap) i can get all selected feature within a layer using : rows = arcpy.SearchCursor("myLayerNBame") But it will list all selected feature that appear (in blue in the attribute...
View ArticleError with area calculation with Command Line Python
Dear experts, I try to calculate an area field via a command line python expression - but nothing works, I can do PartCount etc. but Shape.area and Shape.length yield the following error:...
View ArticleMosaic dataset - Arcpy and data from multiple dates
Hello, firstly, please accept my apologies for the use a Translator, my English is not enough. Subject: more than 11,000 daily on Africa (same extent) images of rainfall. Name files =...
View ArticleSelect newly created feature
I have a script that creates a point with a mouse click (onMouseDownMap). The feature class is in a SDE geodatabase which has about 80,000 features in it. An edit session and an edit operation is...
View ArticleNot seeing tool in Imported Toolbox
Hi, I am having troubles with something related to the importing and usage of a custom toolbox in an arcpy script. I have created a set of script tools and have saved/created them in a custom toolbox....
View ArticleRemoving duplication from Python add-in
I've written a Python add-in, which includes two combo boxes and three buttons. So in my Python code I have five classes. All five include identical code to get references to the current MapDocument,...
View ArticleAccessing Oracle from Python for automated publishing to ArcGIS for Server
Hi, I've been tasked with automating the daily publishing of an Oracle table to an ArcGIS for Server instance. There is no SDE installed on Oracle, and I have little control over the database instance...
View Articlearcpy.GetMessages for multiple from two processes.
Hi I am trying to add a text file that will report any errors and progress of my script. arcpy.FeatureClassToGeodatabase_conversion(fc, ".gdb") and arcpy.FeatureClassToGeodatabase_conversion(savelist,...
View ArticlePopulating Map Document Properties under a Folder
I wrote this script that populates some of the properties for MXDs. mxd = arcpy.mapping.MapDocument(r"C:\test\test1.mxd") mxd = arcpy.mapping.MapDocument(r"C:\test\test2.mxd") mxd =...
View Article