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

Image may be NSFW.
Clik here to view.

Flip subset of lines using arcpy.FlipLine_edit in a Python script

In a Python script I can't seem to get FlipLine_edit to work on a selected set of lines contained within a shapefile. Unfortunately, all of the lines are getting flipped instead of just those that are...

View Article


10.2 Arcpy comboboxclass addin simple question

Hopefully this is a simple question, what variable is used to get the selection from this combo box? ie how do I use this in later code. I am not finding any good resources for arcpy addins. Code:...

View Article


Finding multiple tables and setting them to a variable

There is something that just isn't right with this and I can figure it out. Here is the code: Code:   import sys, string, os, cx_Oracle, arcpy, datetime   LRName = "RSID_"+num   LRName1 = "RSID"+num...

View Article

Loop in python with Zonal Statistics

Hi, I have following problem. I have a layer with thousands of objects - crowns. I have CHM (nDSM) with "height" values. I would like to calculate "All" height statistics for crowns based on CHM, crown...

View Article

Listing data in an SDE

I wrote the code below to list datasets and associated feature classes and shape types (point, polygon, etc.) in an sde. This works fine until I get to the last dataset, Zoning, which contains one...

View Article


Python Scripting Problem

Dear Sir I want to replace "TextString" field attribute values with "Name_Sin" attribute values in an another table. for that I wrote a script to join two tables and calculate the attributes. But the...

View Article

FTPlib datetime

I am experimenting a little bit with python. This is the code I wrote at the moment Code: import os from ftplib import FTP ftp = FTP('??????') ftp.login('??????','??????') ftp.cwd('USBDISK2-0-01')...

View Article

Can't Disable Python Addin Tool in Toolbar

I can't get this code to grey out googletool when I switch to layout view. I have watched the video copied the example code in the help files and read about it. I must be missing something. I also...

View Article


Joining a shapefiles attributes to a table in ArcGIS 10 using Python

Hi Experts, I am trying to join a shapefiles attributes to a table in ArcGIS 10 using Python. This is the code I have been using. What do the errors mean?? Why are error occuring? >>> import...

View Article


How can you sort a set of unique values? Arcpy addin

I have tried many ways to sort that work, but then I can't get unique values. The following works to return unique values, it would seem I need to add something to the onFocus part to make it work. any...

View Article

arcgis 10.2 python add-in, create new tool to popup message box and allow...

Hi Everyone, I am a newbie in the arcgis python add-in. Now I need to create new tool to popup message box and allow user input their request, how can I realize this? Thanks!

View Article

get list of highlighted features within a selection

Hi, from arcpy (in arcmap) i can get all selected feature within a layer using : rows = arcpy.SearchCursor("myLayerNBame") But it will list all selected feature that appear (in blue in the attribute...

View Article

Error with area calculation with Command Line Python

Dear experts, I try to calculate an area field via a command line python expression - but nothing works, I can do PartCount etc. but Shape.area and Shape.length yield the following error:...

View Article


Mosaic dataset - Arcpy and data from multiple dates

Hello, firstly, please accept my apologies for the use a Translator, my English is not enough. Subject: more than 11,000 daily on Africa (same extent) images of rainfall. Name files =...

View Article

Select newly created feature

I have a script that creates a point with a mouse click (onMouseDownMap). The feature class is in a SDE geodatabase which has about 80,000 features in it. An edit session and an edit operation is...

View Article


Not seeing tool in Imported Toolbox

Hi, I am having troubles with something related to the importing and usage of a custom toolbox in an arcpy script. I have created a set of script tools and have saved/created them in a custom toolbox....

View Article

Removing duplication from Python add-in

I've written a Python add-in, which includes two combo boxes and three buttons. So in my Python code I have five classes. All five include identical code to get references to the current MapDocument,...

View Article


Accessing Oracle from Python for automated publishing to ArcGIS for Server

Hi, I've been tasked with automating the daily publishing of an Oracle table to an ArcGIS for Server instance. There is no SDE installed on Oracle, and I have little control over the database instance...

View Article

arcpy.GetMessages for multiple from two processes.

Hi I am trying to add a text file that will report any errors and progress of my script. arcpy.FeatureClassToGeodatabase_conversion(fc, ".gdb") and arcpy.FeatureClassToGeodatabase_conversion(savelist,...

View Article

Populating Map Document Properties under a Folder

I wrote this script that populates some of the properties for MXDs. mxd = arcpy.mapping.MapDocument(r"C:\test\test1.mxd") mxd = arcpy.mapping.MapDocument(r"C:\test\test2.mxd") mxd =...

View Article
Browsing all 2485 articles
Browse latest View live