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

Use Arcpy to manipulate Representation Legend Properties

I have a Unique Values layer file (.lyr) that has a couple dozen unique value symbols in it. I have been working for a while to get a python script tool to apply this symbology to an ouput from the...

View Article


arcpy.Describe(lyr).FIDSet failure?

I have writen a quick code just to improve my arcpy. The code uses a list of letters and then zooms around a California counties layer based on if their name contains each letter. However, it fails...

View Article


Image may be NSFW.
Clik here to view.

Arcgis online sign in box prevents from publishing service using ArcPy

I am publishing a local ArcGIS Server Map service using ArcPy script (script follows below) (running on that very server). Every time I call arcpy.UploadServiceDefinition_server() arcgis online sign in...

View Article

Image may be NSFW.
Clik here to view.

How to published mxd to overwrite existing service on ArcGIS server using...

Hi All, I would like to automate publishing mxd using Python to my ArcGIS server I did this successfully manually using the menu: Share as -> Service, Overwrite Existing service etc... Using Python,...

View Article

Removing characters from rasters and putting them to the front of file name

I need syntax in Arcpy/python that will remove "_pa" from the end of any raster file that has this at the end of its file name. Additionally, on files where this is the case, I want to add "PA_" to the...

View Article


AddJoin multiple layers to multiple tables

I am very new to Python and trying to figure out how to use python and join 14 different feature layers to 14 different tables using AddJoin. Any advice would be greatly appreciated. Thanks, Mehrshad

View Article

ExtractValuesToPoints - No current record error

Hi: I am working at putting a script together using Pythonwin that will work with input data contained in either shapefiles or a PGDb. Script is setup to output to either a folder or a PGb. I have...

View Article

getting data from one column in a table

Hi all, I need to pull data from one column in a table of 4000+ tuples. Each line within this table corresponds to a polygon, the table being the attribute table of a large shapefile. I have a cost...

View Article


Error on Make Feature Layer for looping over selected attributes

I've ran into a bit of a unique problem, which for the life of me I cannot get debugged. I have a two geodatabase feature classes, one with customer regions, and one with zip codes. I'm iterating...

View Article


Simple Arcpy clock/timer

Does anyone have simple syntax so I can add a timer or clock to my Arcpy script? Thanks.

View Article

Accessing MULTI-part polygons in arcpy

By running this piece of code: Code: import arcpy arcpy.env.workspace = "C:\working\GEODATABASES\\tests.gdb" fcList = arcpy.ListFeatureClasses() for fc in fcList:     with arcpy.da.SearchCursor(fc,...

View Article

Select By Location in Script Errors

I have no idea why I can run this tool from tool dialogue but not from the following script? Error Message: Failed to execute. Parameters are not valid. ERROR 000368: Invalid input data. Failed to...

View Article

Help with code(SearchCursor) - urgent

Hello everybody, I'm a student of Geomatics in Portugal and since I'm new with the python language I'm with some problems with my code. I need to finish it as soon as possible to be able to do my...

View Article


Create polygon from click

Hello, I am trying to figure out some code. I have a TIN basemap and a raster file as a maximum height over the TIN. The idea is I need to click a random point on the TIN, have it bring up a window...

View Article

Option in Python do not generate output if the resulting raster have all no data

Hi ArcGIS Python Users, My desired task is to process raster using clip_management tool but I want to add a process where if the resulting raster have no values (all cells are no data) it should not...

View Article


How to access map service layer in Python toolbox?

Hello, I have a URL of a map service layer. How I can access this layer URL from python toolbox. (i.e create featureset from the layer URL). Is it possible ? Thanks and Regards.

View Article

Getting string data from a shape file attribute table

Hello I am looking to extract string field from a shapefile attribute table to then allow me to do a number of IF logic calculations but I am not sure how to get that specific field from the shapefile...

View Article


Making .exe from modelbuilder and python script

Hi Hopefully someone with much more experience in Python can help me. Ive got a model which i created in modelbuilder, and in the model there is a Python script( i did NOT do the coding) found it in my...

View Article

Attaching files to geodatabase from hyperlink field

I have a feature class of 1,000 records which contain a hyperlink field to a 1,000 PDF files. Is there a tool/script that I can use to batch attach the hyperlinked files into a geodatabase? Thank you

View Article

Reclassify Not updating data ranges

Hi, I have written a script that updates all the datasources in an mxd. There are 2 layers that have a graduated color ramp classified by 4 classes Quartile and saves it as a new document. I am under...

View Article
Browsing all 2485 articles
Browse latest View live