color polygons according to one column in attribute table
Hello all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to assign three colors to polygons in 100 shape files, according to one column in the attribute tables. The name of the column...
View Articlepython code for "export map"
Dear all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to know any python code for “Export Map” (under file tab) to TIF in ArcMap. I want to save time for doing it for 100 shape...
View Articlepython code for "add data" in ArcMap
Dear all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to know any python code for overlay two shape files (A and B)(+ icon for add data) in ArcMap. A is a world map. B ranges from B1...
View ArticleRun a script to generate a report and export to excel
Hello I wonder if someone can help me please. I have a feature class which I want to export each record individually into a report (see attached) and then export the report into excel. Each of the...
View ArticleSearch and Update Cursor Need help.
I am trying to update a shapefile by using search and update cursor. It searchs great on of the shapefile but when I try to update the other it only retrieves the first data. I am providing my code so...
View ArticleInsert cursor: No support for this geometry type.
Hi, I try to do a PHP Code: arcpy.InsertCursor("db.sde/db.dbo.IMPORT") but I have this exception: PHP Code: ERROR 999999: Error executing function.nNo support for this geometry type.) PHP Code:...
View ArticleGetting Alias Field names from layer in mxd 10.0 SP5 not working
I am trying get the field aliases for each of the layers in an mxd document. I have the following snippet that should do the trick. Code: import arcpy from arcpy import env import os, zipfile, zlib,...
View ArticleChange linear unit of spatial reference for geometry in cursors?
Hi, I want to change the spatial reference linear unit for geometry calculations. I know you can pass the sr object in cursor, so I tried this: I read from the document that linearUnitName is both...
View ArticleMany Points to Few...
Hello, i am unsure if this is the correct place for this but it is an arcpy problem and i am new here, feel free to redirect me. Anyway I am trying to reduce a large dataset of about 4.6 Million points...
View ArticleLabel with first letter of string
Hi I want to label a point layer with the first letter of a string. The column name in the point layer attributet table is Kommun For example Kommun can have value Rattvik. I want all Rattvik points to...
View ArticleRemove any text after defined amount of characters
Hi, I have a text field which should only have 13 characters (the remaining are spurious) I have looked at the trim function but cannot get it to work. Is there a python method to do this? Had a look...
View ArticleCreate service with network capabilities
Hi, I need to create a Python script that automatically publishes services with network capabilities. To do this, I use the function arcpy.mapping.CreateMapSDDraft to create a draft from an MXD. The...
View ArticleModify page numbering in PDF Map Book ie.( i, ii, iii, 1, 2, 3...)
I have three cover pages and I want the map pages to start at 1 under the page thumbnails. I've succesfuly made this happen by opening up the map book in a text editor and adding the following in the...
View ArticleField calculator calculate mean values of multiple rows when some values are...
Hello! I need to calculate average value of 7 fields (Index2006, Index2007, Index2008, Index2009, Index2010, Index2011, Index2012) to field IlvesAve (see illustration). Attachment 29714 The problem is...
View Articleif attributes exists
I have the following code that work good, but i would like my script to check if there is text(string) in the FacltyType field on Points_1 if it does i would like the script to skip that feature, but...
View ArticleScript works as stand alone, fails when ran as script tool with ascii...
I am encountering a strange problem with a script I am trying to run. It updates a Site confgiruation .xml file for setting up Silverlight based REST sites. The code below is a function that is...
View Articlearcpy.sa.Sample() Spatial Analyst "Sample" method
Devloping an implementation that will build a GDB table from the raster cell values of a series of input raster datasets using the sa.Sample(). It works exactly as intended when I specify the output...
View Articleif the point is inside the polygon get data from a particular field while...
I found a snippet of code that returns if the point is inside the polygon. I like the idea but I want the code to do a little more than just that. For example, let's say I use my tool the selected...
View ArticleAccess Import Symbology Matching Dialog with Python?
Is there a way to access the functionality of the Import Symbology Matching Dialog when applying the symbology from one layer to another? I'd like to apply layer symbology to a new layer in a Python...
View ArticleExporting feature classes in to gdb
Hi guys, I am new for Python. I have been trying to write a stand alone script to create a gdb and transfer files from another location to the new gdb. When I run the script I keep getting the...
View Article