Python error when using the describe function
I'm getting the following error when I run my Python script tool on Personal and File Geodatabases that have more than one feature class in them on a 10.0 machine. I tried debugging it today, but I am...
View ArticlePython script to enter String & Dates in existing fields
All, I am attempting to write a Python Script that selects a record in the attribute table, zooms to the selected feature, and prompts the user to enter their name, date created, and date modified. The...
View ArticleHow to convert excel to csv?
I been looking for the code to convert an excel into a csv? I also look in ArcHelp for code that can convert excel into a xy event but they require csv. So, if I there no way to convert the code to a...
View ArticleGetting the user to set the workspace?
Hi all, I've got a question. I'm trying to write a python script. As I want to automate as much as possible, I'm just wondering would it be possible to make the workspace a variable so that all that...
View ArticleHow to encrypt logic script within Python Add-In?
I would like to share my addin with few people but don't want them to see the logic script. As part of AddIn, all scripts and supporting modules are copied into Assembly Cache -- easily accessible. One...
View ArticleMultiprocessing viewsheds (easy)
Hi there, I have been searching the forum for this but eventhogh it seems that the solution should be quite easy to come up with, I couldn't find one. My system: Arcgis 10.1 Sp1, Python 2.7.2, I7 4770k...
View ArticleSetting workspace dynamically as part of out path
Hi all, I've successfully managed to set my workspace as a 'arcpy.GetParameterAsText(0)'. I then created a file GDB and I'm now trying to create a rasterdataset in this file GDB. The rasterdataset...
View ArticleUsing arcpy.mapping to extrude point features for converting to 3D features
Hi All, I am trying to automate a process of converting point centroids, extruding them and then converting them to 3D features. This is a small section in a much larger process, but is it possible...
View ArticleColored scatterplot
I have the following data: X Y Z 1.19933759128 1.32660544917 1 1.56272090146 1.43261248809 5 0.73548763543 2.5888666696 4 1.02178276525 2.0445409215 5 1.09981521623 1.40485231582 3 0.26602687666...
View ArticleToolbox filepath from ToolValidator?
Hello, Anyone know if it's possible to grab the filepath of a toolbox file (.tbx) from the ToolValidator class? I was thinking of using a shapefile as an optional input and distributing the data along...
View ArticleCreateRandomPoints_management creates empty feature class
Hi guys, I'm totally lost and on the verge of a mental breakdown. I'm trying to write a script for an automatic CostPath analysis and I'm getting very weird results and errors. Basicly what I want is...
View ArticlePrint Values from a Specific Field in a Feature Class
Hello GIS Community! This seems so simple but has been so difficult to figure out... How do I iterate through records in a feature class and print out the value in a specific field? I know that I need...
View Articlepythonaddins.GPToolDialog
I am having problems with retrieving and using user input in phthonaddins. The only tool available that I know of is the GPToolDialog function (if there is an alternative, please let me know). I have...
View ArticleSet scale in python
Hi all, this is my code: .. Code: zoom = arcpy.mapping.ListLayers(mxd,cut,"")[0] # we locate cut layer in TOC. cut is a variable df.extent = zoom.getExtent() # Zoom to Layer zoom df.scale = 20000 # we...
View ArticleCreateDatabaseConnection_management doesn't return an error for no-existing user
I've tested the "arcpy.CreateDatabaseConnection_management" and I found out that, unlike the manual process, it's possible to create a connection file from invalid user's login without receiving any...
View ArticleBug with arcpy.mapping.UpdateLayer() method ??
Greetings and Salutations Python Masters of the Universe, I believe I have a minor bug here with the arcpy.mapping.UpdateLayer() method. If anyone can help me correct it or work around it I would...
View ArticleFOR Make Raster Layer
Hello everyone Could you help me with my FOR?, , I want to convert the raster to feature raster layer , their names are contained in another layer INFO_1 field. I printed all values with FOR of...
View ArticleSetting up Python script to run from a toolbox?
I use ArcGIS 10.0 and have written some python scripts with input parameters. Now I want to make tools using these scripts. Is it possible to create tools such as in ArcToolBox using python scripts? -...
View ArticlePython script to enter name string
I am attempting to write a Python script that selects a record in the attribute table, zooms to the selected feature, and prompts the user to enter their name. The name field already exists in the...
View ArticleHelp with Python Script - Selecting by Location - Sql string
My goal with this script is to select points within a polygon based on a sql statement that identifies the polygon to base the extraction on. If anyone has any ideas, it would be greatly appreciated. #...
View Article