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 Articlearcpy.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 ArticleArcgis 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 ArticleHow 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 ArticleRemoving 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 ArticleAddJoin 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 ArticleExtractValuesToPoints - 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 Articlegetting 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 ArticleError 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 ArticleSimple Arcpy clock/timer
Does anyone have simple syntax so I can add a timer or clock to my Arcpy script? Thanks.
View ArticleAccessing 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 ArticleSelect 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 ArticleHelp 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 ArticleCreate 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 ArticleOption 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 ArticleHow 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 ArticleGetting 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 ArticleMaking .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 ArticleAttaching 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 ArticleReclassify 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