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

Select a Feature by Rectangle( Better code display)

Hi I have created a Python Tekinter GUI with a listbox to show the map layers and some button widgets. I have to bind a "Select Features by Rectangle" function to the "Select Feature button "Button 1"...

View Article


Show only the selected features

Hi I have selected some features using "Select Features by Rectangle" tool and now I need to show only the selected features on the map using python codes. I also have to do the reverse action like...

View Article


looping through rasters in an mxd

Hi all, newbie question here. I'd like to use the Python window to write a piece of code which loops through all the rasters in an mxd, and creates a polygon of the outline of each raster. The Raster...

View Article

replaceDataSource error

Assuming my path names are correct, can anyone suggest a reason why the "replaceDataSource" line in my python script keeps returning an error? Cheers, Damian Code: import arcpy lyrFile =...

View Article

Why does this script take so long to run?

The script below works in that it does what it's supposed to: creates a single Case feature from selected parcels. But it takes anywhere from 1.5 - 2 minutes to run, which seems a long time for a...

View Article


Create Services in a Folder

Hello, I have a script that publishes services using these commands: arcpy.mapping.CreateMapSDDraft arcpy.StageService_server arcpy.UploadServiceDefinition_server The script is working fine, but now I...

View Article

PYT: how to set symbology on output feature class?

Ok, I'm stumped (again!)... If I comment out my output parameter this works great and I have point features in my FC, but I need set the output symbology with a lyr file. If I keep the code the way it...

View Article

ArcGIS 10.1:Importing Excel .xlsx type data of X,Y-coordinates of 65 points...

Hi all, I have an Excel .xlsx file that has X,Y-coordinates of 65 points/locations (WGS84): id Name POINT_X POINT_Y 0 DH-1 -77.06710444370 38.86984392600 1 DH-2 -77.06646496950 38.87006592120 . .......

View Article


Python Toolbox Tool Display Order

Hi, I've been coding a python toolbox for use in a data conversion process. I would like the tools to be presented in the order in which they need to be run as opposed to alphabetical which seems to be...

View Article


Pythonwin Freezes when trying to adjust View options

I just upgraded from 10 to 10.1, at the same time I uninstalled my old Pythonwin and upgraded to this version (pywin32-218.win-amd64-py2.7). Everything seems to have installed properly but problems...

View Article

arcpy.mapping Change TextElement/GraphicElement colors

I have noticed in the arcpy.mapping module that TextElement/GraphicElement color is not an exposed property. It would be very helpful if it was!!!! Every year I have to chnage the color of these...

View Article

Select and copy features using add-in tool.

Hi, I'm trying to add a tool to an add-in toobar to select features from an existing feature class and copy them across to another feature class. I need two tools, one for a point and one for a...

View Article

Joining multiple geodatabase tables via inner join

Hi there, could some one point me in the right direction on how to join multiple geodatabase tables via inner join. i have 6 tables in my geodatabase. each shares a common key field, ill call it...

View Article


error at creating point shapefile from coordinates

Hello! What I am trying to do here is to create a new point shapefile based on coordinates that are read from the atribute table of other shapefile. This is part of a larger script, I hope somebody can...

View Article

Parsing list object file paths for file name

I am trying to automate a naming process that takes the file name from a list of file paths to name other folders, geodatabases, zipfiles, etc. The problem I'm running into is that, I assume, I am...

View Article


Can selected data be exported to csv, xls, or similar?

I'd like users to be able to open exported data in an Excel friendly format - csv, xls, xlsx, etc. Using TableSelect_analysis or CopyRows_management, data can't be exported in any of those formats, as...

View Article

adding muliple layers to muliple mxds w/ a simple script has a minor error

After looking for sample code in the arcpy site help and skimming 55 pages of past python forum threads I ended up with some sample code, that I modified, that should save multiple gis layers to...

View Article


SQL syntax for Extract by Attributes with "OR" operator error

Hi all, I am trying to write a Python code block using Extract by Attributes with a SQL query including the "OR" operator that consistently will not work regardless of the syntax I try. As it is the...

View Article

Exclude Unselected Features

Hi I have selected some features using "Select Features by Rectangle" tool and now I need to exclude unselected features on the map using python codes. I also have to do the reverse action like...

View Article

Codes for"select features by rectangle" don't work

I have created the following codes to select some parts of a layer by drawing a rectangle, but they don't work when I push button 1 on my tekinter GUI. Code: def button1Click(self, selection):...

View Article
Browsing all 2485 articles
Browse latest View live