Can't apply math operations in Python Labels
Hello, I'm trying to label point features with numeric values divided by 1000. No matter how I try to do this in Python, it will not work. I tried using 'int' and 'float' on the numeric field in...
View ArticleConnecting points with lines and creating a new attributes
Hello, I am a novice at Python, so I have hit a road block in my work. I want to be able make a script that connect points with lines and then populates a column in attribute table with what points are...
View Articlearcpy.da.UpdateCursor use variable as field index?
I'm working with an arcpy data access update cursor with a lot of fields that have an old/new pattern (e.g. oldField1, newField1, oldField2, newField2, etc. I have a very simple operation I'd like to...
View Articleproblem with ApplySymbologyFromLayer_management not applying symbology
I am running ArcGIS v10.1. Here is a snippet of my arcpy code. I am trying to apply symbology to point features. The layer to display and my symbology layer both have the attribute "DESCRIPT" to match...
View ArticleList fields from fc and selectively udpate to fields in SQL Server table
In this code, I'm trying to take the the contents of two fields from a particular gdb feature class and bring add them to two existing fields in a SQL Server database connection. The two database...
View ArticleDeleting MXDs after PDFs are Created!
I have a program that places the PDFs of each mxd in the same folder. This is fine. I just need the mxds to be deleted (after the creation of the PDF) or I need the PDFs put into a seperate folder away...
View ArticleSpatial Reference grab not working...
I have a large metadata generating script that is working great, except for some reason the spatial reference of the data being grabbed and wrote to a Word file is not working. First, the portion to...
View ArticlePython subprocess module and 64 bit background geoprocessing in v10.1
I have a script that relys on the 'subprocess' module to basically run seperate instances of arcpy as a parallel process. After installing the 'ArcGIS_BackgroundGP_for_Desktop_101sp1.exe' 64-bit...
View ArticleGenerate new points on polyline from existing points on polyline
I have a polyline that represents the thalweg of a river. I have points snapped to that polyline, which represent locations where I've collected data. I am looking for a Python tool that will allow me...
View ArticleIf - then comparing two attribute fields
I am try to use a Python codeblock in the field Calc tool to compare two separate fields, and populate a third. For Example: def Reclass(Buffers): if (SIZE = Large and Fishbearing = Yes): return 200...
View ArticleOptimum python IDE for debugging?
What is ESRI's 'official' stance for which Python environment to debug in? Pythonwin seems to be advocated, but I've noticed there are others such as pyscripter. Which one offers the best debugging...
View ArticleLearning Python
I have taken a beginning Python class but I am wanting more experience. Can anyone tell me where to start reading to learn the stuff you guys know. For Example : os.path.basename and dir =...
View ArticleScript for adding the most recently modified shapefile in directory/.gdb to...
I am trying to write a script that walks through a folder to identify the most recently modified shapefile/feature and then adds that shapefile/feature to the current .mxd. I've seen a lot of...
View ArticleMake rows invisible
Hi I know how to make a layer invisible using python codes. I use the following code. Code: layer.visible = false But I need to make some parts of a layer invisible. in other words I need to make some...
View ArticlePYT: Copy parameter
In a Python Toolbox, I ask the user for 2 parameters, an input and output mxd: Code: def getParameterInfo(self): """Define parameter definitions""" param0 = arcpy.Parameter(...
View ArticleUse Selection of one Combobox to update the items list in another Combobox
So I have a series of Comboboxes which I created to perform a "Quick-Jump" function in which a user can select AOIs at varying geography levels, and kind of quickly drill down into a very specific AOI...
View ArticlePython Script into a Tool for a Toolbar
I know how to add a script tool to a toolbox but I do not know how to make my script into a tool to put on a toolbar. Please help!! My code is below: import arcpy, os folderPath = r"C:\2 - GEO-DATA...
View ArticleControlling State with Python Add-In
I am trying to control the state of one button using another and nothing I have tried so far has worked. This is what should work. Any suggestions? Code: import arcpy import pythonaddins class...
View ArticleSetting a Script to Script Tool in Toolboxes
Have a question. So to put my script in a script tool, I need to add Parameter information into the code. When you create a script tool you have to set its parameters from your code to have it work....
View ArticleNeed help looping thru list of tables and appending results to dbf
I have created a multiple tables using the ArcGIS 10.1 tabulate intersection tool and want to automate the following process in python 2.7 within an open map document: I want a list of the table names...
View Article