Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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 Article


Python 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 Article


How 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 Article

Getting 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 Article

How 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 Article


Multiprocessing 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 Article

Setting 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 Article

Using 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 Article


Colored 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 Article


Toolbox 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 Article

CreateRandomPoints_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 Article

Print 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 Article

pythonaddins.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 Article


Set 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 Article

CreateDatabaseConnection_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 Article


Bug 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 Article

FOR 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 Article


Setting 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 Article

Python 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 Article

Help 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
Browsing all 2485 articles
Browse latest View live