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

Check Spatial Reference for Params in Tool Validation

I am struggling trying to check the spatial reference in tool validation. Can anybody provide a little direction. You should get the gist of what I am trying to do with what I have here... Code:   def...

View Article


Python scrtipt to get the sum

Hi, I have created a model builder and need to get the sum of 2 fields on multiple attibute tables. How can i include a python script in model builder to perform that. Thanks in advance.

View Article


Help Python (Parameters)

Hi, I have a little problem, and I hope you guys will be able to help me :] My goal is make a parameters that will '' search '' in a field (name of a street) in a csv file. Python doesn't seem to...

View Article

Is there a way to set row position when creating a new data field?

I have roughly 30 feature classes that have stored dates as strings in multiple columns of data (e.g. "4/12/11") I'm going to begin converting the strings to date data types, but I have another script...

View Article

Image may be NSFW.
Clik here to view.

How to add and create points feature from Latitude and Logitude by arcpy python?

I am wondering if there is any simple way to add Latitude and Logititude. In GUI, it is simply addxy data but I cannot find the corresponding arcpy functions. Attachment 33046 Attached Thumbnails  

View Article


Refresh a Table View after Append_management

I am trying to use the Append_management tool in a Python script tool where a table view in ArcMap is the output. The append works, but if the table view is open the appended records won't appear and...

View Article

Get script path from ToolValidator

Hi All, From inside the ToolValidator in a script tool, is there a way to determine the path of the script to which a script tool is pointing? I'd like to set the default value of an input data file...

View Article

What is your favorite Python GUI package?

My primary goal will be to create add-ins using Python that include some GUIs. Beyond that, I'm interested in creating some stand alone Python apps and wondering what is the best all around development...

View Article


GPS data - points to line loose information

Hi Probably wrong place to post, but I gave figuring out the logic behind the forum. I have a dataset of GPS data from a collar that was on a Red deer for a few months. This is point-data logged with a...

View Article


Image may be NSFW.
Clik here to view.

SyntaxError in Tool - Help to understand and correct that error!

Hi! I've downloaded TBX and all the scripts to run some tools in ArcGIS 10.2.1. First, I set the script file path and than I run to test all those tools. For all of them, I received the same massage:...

View Article

Python Script: loop through selected features and and copy to geodatabase

I am working with surface types that I derived from LIDAR data. These surface types are in one feature class (polygon) - associated with the feature class is a column called "grid_code"; the grid_code...

View Article

Python script to Control Map (2 way communication)

Hi, I want to create a add-in which can query over a layer and can show all selected feature attributes in same window only. Also user can highlight a feature by selecting it (just like attribute...

View Article

programmatically add Attribute Table Function to Mosaic Dataset

I am trying to programmatically add a DBF file containing themes/color values to a Mosaic Dataset using arcpy.EditRasterFunction_management. It runs without errors but it's not working because after I...

View Article


Trouble using "in_memory" to temporarily store geomety

Here's my script that I'm writing before I convert it into an Add-in button. It seems like it's actually creating a feature class called "in_memory" in my default.gdb... Code: layers = get_layers()...

View Article

After 10.2.1 update Arcpy 64 bit ERROR

I've updated my ArcGIS desktop version from 10.2 to 10.2.1 and have noticed that when I run the 64 bit version of IDLE I now get an error when trying to import arcpy: Python 2.7.3 (default, Apr 10...

View Article


arcpy.CalculateField_management Error

I'm using the arcpy lib in arcgis 10.1 and to work on a script. When i use the arcpy.CalculateField_management i'm getting an error . Could someone help me identify whats wrong with the expression...

View Article

error return without exception set

I have the following code. The code works great on a shapefile but as soon as i change the workspace to a SDE sqlexpress datatbase i get the following error. Code: Traceback (most recent call last):...

View Article


Python add in- update two fields in one feature based on same fields of another

I'm totally new to making add ins and quite novice at python itself but I have a script that executes perfectly as a script tool or simply in the python window of ArcMap. I want to make this a quick...

View Article

Iterative Select by Location: Return the record with the most features in radius

I need to figure out how to determine which feature in a dataset has the most features within a defined radius. I'm thinking I need to loop through the entire dataset, perform a Select Layer by...

View Article

Image may be NSFW.
Clik here to view.

Add basemap by arcpy (python)

Hi All I am wondering how to add Base Map by arcpy. It is such a simple operation if you use ArcGIS Desktop GUI But I am wondering how to do the same in arcpy code. Attachment 33091 Attached Thumbnails  

View Article
Browsing all 2485 articles
Browse latest View live