Package Third-Party Module with Python Addin
Does anyone know how I would go about packaging a third-party Python Site Package with an addin. I want to package SendKeys with my addins so that I can implement a programmatic method of Pause Drawing...
View ArticlePython: deletion of feature classes and tables except for those with...
Hello, I would like to add a piece of python to the end of arcpy script that will search a file geodatabase and delete all files except for those in a list that I will specify. I am not sure where to...
View ArticleUpdating field based on location
I have the following information: A table with a list of cities A cities layer A grid layer I am trying to write a code that goes through the list of cities and searches for each grid that intersects...
View ArticlePython add-in to generate a rectangular polygon
Looking for some code samples that will automate the creation of a square or rectangle polygon of a specific dimension into a target layer when the user clicks a custom button. Not sure where to find...
View ArticleChanging script parameters at runtime?
I'm working on a python toolbox script, and I am able set all the script parameters in code. However, what I would like to be able to do is make new parameters or change some of the parameter...
View ArticleStruggling with acpy undoOperation
I have developed several toolbars but after some use I decided to try and add undo button to my tool bars. However, I am struggling to implement the arcpy undoOperation function in just the Arc Python...
View ArticleUpdateCursor issue: "can't multiply sequence by non-int of type 'float'
Attempting to use an update cursor to update a field 'Cost' by multiplying the value in the field 'Area' by a value input by the user. The trouble seems to be getting the variables "Price1" and...
View ArticleHelp with Opening GIF Images by Clicking Button on Horoscope Program
I need help with the button action for this code. When you click on the button, a new window should open with the GIF image of the horoscope sign. The name of the GIF image files are "Pisces.gif",...
View Articleif statement
i have information about the population in a city and the master plan of it, and want to make a new master plan for areas of expansion in this city through the coming years, that is by comparing the...
View Articledef py-function
Hello, I would like to use in the field-calculator a python-function, which counts a stringpattern like this Gbv***(FFH) the string looks like Gbv, Bk (FFH), Gbv (CEF) thans al ot klaus
View ArticleUse UpdateCursor to update field based on a change in another field
Hi, I am trying to update a field "TPN" based on another field "PASS_NUM". In my script "TPN" is a newly added number field and thus blank, "PASS_NUM" is also a number field but it contains the wrong...
View Articlecopy features - works only for Points?
Hi All I'm writing a arcpy script to copy many feature classes from one workspace (file geo database) to another. It's important for me that the script works between existing feature classes, i.e. Not...
View ArticleSQL Syntax for table select
Hi i am trying to perform a table select on a file gdb table using the table select tool in python. It is a date field and i can get find the syntax error. I am sure it something simple. any...
View ArticlePython Script to creat service areas and compare their coverage
Hello Members, am stuck on my code for service area analysis. I have a .shp of hospital locations that have been geocoded, a networked dataset that I built and a county layer for one state. The problem...
View ArticleMeasuring routes in python
Is it possble to measure a route for an M enabled polyline feature class using python. I want to measure a route cosisting of river sections. Each arc is from one river confluence to the next. I want...
View Articleselecting features from a shapefile
I have two shapefiles (CountyCenterLine and GBMPO_Ped_07_11). I am attempting to return the number of points found within 60 feet of each road segment. I then want to access a field I have created...
View ArticleCalculate date difference
Hi, I need to calculate the difference between two dates in days. I need it to work within the Model Builder since these are models that need to be published later as a GP service. I have two fields,...
View ArticleData Driven Pages: Python code to include page index in output file name?
I have used the DDP toolbar to set up DDP where 'Reach' is the index layer (as in river reach). Each of the 100 Reaches has an ID, stored in the attribute table. I want the output JPG name to be Reach...
View ArticleHelp with dictionary default value syntax.
I have tried all types of syntax, tried to incorporate an if , which throws an error something about lists not being hashable. (or something), but Im inputting a dictionary. I set up the dictionary....
View ArticleHow to select on an Oracle Database Sequence value in arcpy
I need to be able to get an Oracle Database Sequence value (either CURRVAL or NEXTVAL) using an arcpy sql query. I used a generic sql execute function as opposed to the SelectCursor function but cannot...
View Article