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

Image may be NSFW.
Clik here to view.

I need help in this one because its messed up

Please can u help me in the third function because I am desperate to know how it works!def split_on_separators(original, separators): """ (str, str) -> list of str Return a list of non-empty,...

View Article


Detect broken links with arcpy?

Hi, I adapted some code I found online to search for broken (moved or renamed) hyperlinks in a shapefile. It should write all broken links to a text file, but instead it is writing ALL the hyperlinks...

View Article


shortest distance between points across the boundary

Dear colleagues, I have the following problem I cannot solve. I have house transaction data and catchment boundaries that have been spatially joined, so that I can identify, in which catchment area a...

View Article

hello,how to import arc hydro tools in arcpy ?

I want to import arc hydro tools in arcpy,but i can all show me error and i need help thank you !!!

View Article

Cannot Acces SDE Connection File Properly using Arcpy

I am testing a way around accessing sde connections using arcpy. I have 2 existing sde databases connected in ArcCatalogue that require passwords anytime I go to connect to them. It seems that there is...

View Article


Can u help me in this one?

Please can u help me in the third function because I am desperate to know how should I do it def split_on_separators(original, separators): """ (str, str) -> list of str Return a list of non-empty,...

View Article

Copying files from one GDB to another with error reporting.

I was hoping someone here could help me! I'm trying to write a script that will allow me to transfer files from one GDB to another, excluding lines, and generate an error report in the process. In the...

View Article

Automatically calculate age from HTML date field

hello friends i want to make employee registration form by using HTML & CSS as User Interface, Python as Script and PostgreSQL as database, here i want to know, how to calculate age from Date Field...

View Article


Extending Current Profile\Longsection Python Script

I've generated a python script that extracts the points along a proposed pipeline alingment to generate a profile\longesection for our engineers. Previous Post Code: ''' Created on Mar 5, 2014 @author:...

View Article


'Floating licenses' being taken by script

Hello all, I feel like I'm missing something simple, but I have a script that uses arcpy.CreateRandomPoints_management which requires either a spatial analyst license or ArcInfo license. At work we...

View Article

Code for leaving a value alone if a condition is not met

Hello - I have a script that updates a field based on a date in another field. If the date in the field "Compliance_Date2013" is over a year old, the script changes the value to "expired" Otherwise, in...

View Article

AddLayer -- dynamically interact with open mxd document?

Hello, I have been unsuccessfully attempting to add layers programmatically to an open mxd document via arcpy scripting. I AM, however, able to add the layers to the mxd, save a copy of the mxd and...

View Article

Need to calculate values for multiple records with a commond ID # ArcPY

I have a table "Projects" with multiple project ID's and multiple records per project ID. I want to take the sum of values in multiple fields and combine them based on project ID. For example Project A...

View Article


Never ending While Cant figure out my error?

Code: for row in wtlndRow:                 if row.WtlndUnitID is None:             totalArea = 0             wtlndUnitID += 1             adjWtlnd = arcpy.MakeFeatureLayer_management(wtlnd4Units,...

View Article

Pan/Zoom to selected features in Python Add-in

Hi, I am trying to write a simple Python add-in that provides a combo box allowing the user to enter a project number. They can then click buttons to 'draw' (i.e. select all the pipe features in that...

View Article


Need a solution

A am making hundreds of plat maps using parcel data. Many of the maps have several parcels per map. Each parcel needs to be a seperate color and I would like to use the same colors so the maps will...

View Article

Executing Hazus Software through Python Script

I am trying to write a script that runs Hazus Software but am having a hard time getting started and keep getting an invalid syntax error. The problem is that I'm not sure if I should also be importing...

View Article


searchcursor on layer using text field and query

Hi, I'm trying to use a SearchCursor to loop through specific records in a layer in an ArcMap project. I would like loop through specific records based on a text field in the layer but I'm having...

View Article

How to run ArcPy on PC with only ArcGIS Server 9x or 10x ?

Please, give advice how to run Python script which uses ArcPy on PC with only ArcGIS Server 9x or 10x ? Is it possible ? Script run on desktop machine where is installed ArcGIS, but on server with...

View Article

listing gis files on disc

I have found this script to list shapefiles/geodatabases/dbase files/coverages on a disc. The script runs well, BUT when i run it a second time, datalines are addded,; so my listing is getting larger...

View Article
Browsing all 2485 articles
Browse latest View live