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

Help selecting required assemblies

Hello Everyone, I am relatively new to python and need some help. I have a electrical dataset consisting of lines and poles. The purpose of my script is to spatially join poles that are snapped to...

View Article


getting the field name in searchcursor through variable

I am doing a bulk spatial join on gps points by assigning the attributes within a site buffer to the points themselves. Unfortunately, there are 4 different types of GPS points. Within that, I only...

View Article


arcpy.ListFeatureClasses() Problem

To All Python Users: I have a python script with arcpy.ListFeatureClasses() that I wanted to use to get a list of all feature classes in a file geodatabase. This method has worked perfectly in the...

View Article

How to write the python for this complicated situation ?

How are you,Everyone! I research about the network distance from post box points to neighbourhood points. 1.The distance from post box point to neighbourhood point is (D). 2. For each post box,I just...

View Article

Batch processing animal home range overlap data

Greetings, Am new to python, but even with rudimentary knowledge am already finding it incredibly useful. Have put together the following script to calculate home range polygon overlap, at this point...

View Article


Python or Model Builder Solution to write file names in Excel

Hello Everyone, I am trying to list all photo name in excel column under header “PhotoName”. Currently I am using following code to get list of file names which works fine import arcpy from arcpy...

View Article

Get Selected Layer

I'm looking for a way to get the currently selected layer(s) from the TOC. arcpy.mapping.ListLayers() returns all layers in the data frame. I only want the ones the user has selected. Does anyone know...

View Article

if else loop problem

Hi, I have written a script for toolbox that selects cities and outputs them to a table (citylist). It all works apart from the if....else part. if: maximim kilometres to interstates > 0: subselect...

View Article


Arcpy - Select or Identify Features?

I'm just getting into the new Python Add-in capabilities and trying to create some simple tools. I would like to run a tool for the user to select or identify a feature on the map with a mouse click...

View Article


Raster Functions, update specific rasters. (Loop)

Hey all! I'm trying a script that updates Raster Functions on specific rasters in the mosaic dataset. The problem is that this code doesn't work when its in a loop. I need the loop to make different...

View Article

Python - arcpy.da.UpdateCursor

Is anyone knows setNull() works for arcpy.da.UpdateCursor? thanks

View Article

Cannot use arcpy.da to add junction features to geometric network

When I attempt to use arcpy.da to add junction features to a geometric network, I get the error "error return without exception set." Here's the code in question: Code: def Migrate_GasLamp_DA():...

View Article

Python Add-in for Area Calc

Well, i have some layers with diferent types of area. I need to calculate polygons area, then make some operations with all polygons area, its python my solution for that? Well i have shape area, but i...

View Article


Layer definitionQuery memory leak

Morning everyone, The following code is being used on a very large dataset - millions of records. The definition query seems to be the culprit. Anybody have any ideas how to stop it please? Also, I'm...

View Article

Cancel event in Python Gp tools with arcpy

In GP-tools written in C# (ArcObjects) we can listen for the Cancel-event and react on that. I wonder if there is anything similar in Python GP-tools applying arcpy. I googled that issue and the only...

View Article


Location of Python Win to Install ?

Hi All, Can somebody help me out on this ? I want to install python win, but dont know where to install ? I've just got wrong location, and need to re-install arcgis to fix....

View Article

Else if or maybe Where Clause for Update Cursor.

I have several conditional statements I want to use to update values in an attribute table. I have been using update cursors as of late with some success. But now I am at a point that I am struggling...

View Article


Multiple Field Parse, Greatest Value Label

I'm trying to get a label script to work in ArcMap. So far it works, but it's not 100% accurate. For the most part it seems to be working but there are certain labels that are wrong. My code looks at...

View Article

Python Help - Layer Transparency

I'm just curious if someone could help me out with a python problem. I need to set transparency for all the layers that I just created to 25, If the layer name is "Com_Census" or "Com_Crime" then i...

View Article

Exception Raised on my for row command line?

I am gettin an exception raised on my for row command line and I think it is because I am not declaring my fields correctly. Would I use the ListFIelds command like shown or something else. Code:...

View Article
Browsing all 2485 articles
Browse latest View live