|
POST
|
Having suffered enough frustrations with 10 bugs and crashes, I decided to finally reinstall 9.3.1 throughout our department. Since we have many mxds as 10 mxds I thought I could write a nice little script to convert them all to 9.3.1 mxds and get on with work using 9.3.1. Unfortunately, I too, get the �??this map created in a later version of ArcGIS�?? message. Too bad this function, like so much of 10, did nothing but waste my time. Maybe, if this method works sp2, and someone is still tired of 10, here is the code to convert all the v10 mxd to 9.3 mxds in a new directory. [HTML] #Convert all the v10 mxds in TheFolder, and any subdirectory in TheFolder, to #an earlier version of mxd to CopyToHere directory. try: import arcpy, os, sys TheFolder = r"Z:\GISpublic\GerryG\ATLAS\Copyof2010LummiAtlas" CopyToHere = r"Z:\GISpublic\GerryG\ATLAS\Copyof2010LummiAtlas\93mxds\\" for root, dirs, files in os.walk(TheFolder): for file in files: if file.endswith("mxd") or file.endswith("MXD"): print root print file mxd = arcpy.mapping.MapDocument(root + "\\"+ file) #Only make copies of mxd that have a dateSaved value (v10 only) if mxd.dateSaved: print mxd.dateSaved mxd.saveACopy(CopyToHere + file, "9.3") print "Done!" sys.exit() except: print arcpy.GetMessages(2) print ErrorDesc.message print "Error" sys.exit()[/HTML]
... View more
12-28-2010
11:18 AM
|
0
|
0
|
1533
|
|
POST
|
I am not sure if this is your problem but when you are finished with a cursor be sure to use something like del row, rows By not deleting the row and rows (or whatever you name them) you can get schema locks when you try to run another cursor on the same data.
... View more
12-28-2010
07:27 AM
|
0
|
0
|
1228
|
|
POST
|
I have a data frame, point shapefile, and elevation GRID all in the same coordinate system, datum, and projection, WA State Plane North. When using the Add Surface Information toolbox tool (ArcGIS 10) to populate the point file with GRID values the z factor (optional) parameter is grayed out with a setting of 3.28083... This setting needs to be a 1 since the z values are in feet and the pixel values are in feet ohterwise the output values get scaled by this value. I am not sure why the tool thinks it needs to do a meters to feet conversion given the data. I played around with different surface models (usgs) and I am able to set this parameter there. Any ideas why this would be happening, other than a bug in ArcGIS would be great. Oh, and exporting the tool to Python solved the problem in the short run since I was able to reset the parameter there. Thanks Gerry
... View more
12-06-2010
03:10 PM
|
0
|
1
|
3752
|
|
POST
|
Convert the path string to a list, and extract out the last items which is the feature class name. Something like this in Python... TheShapefile = "C:/Temp/myshapefile.shp" ThePathAsAList = TheShapefile.split("/") TheFileName = ThePathAsAList.pop() print TheFileName Then use TheFileName to reconstruct a new string that is the full path to the newly created data.
... View more
09-27-2010
12:55 PM
|
0
|
0
|
922
|
|
POST
|
If they are points, just calculate xy values by calling the ArcToolbox tool, and populate the attribute table with lat/long. Then use a search cursor to extract the lat long for each point.
... View more
09-23-2010
10:42 AM
|
0
|
0
|
2494
|
|
POST
|
Assuming the indentations are correct, you don't use the ! in the code itself, and you need == not =. See the link below. Good luck if (Shape_Area / 2000) - (math.trunc (Shape_Area / 2000) + 1) == 0: www.esri.com/news/arcuser/0507/files/pythonscript.pdf
... View more
09-23-2010
10:33 AM
|
0
|
0
|
1712
|
|
POST
|
There are tools in ArcGIS v10, or in Hawth�??s Tools, that will create a line from point data. Better would be to use any point, line or polygon dataset that have z values to create a TIN surface model directly with the tools available in the 3d Analyst extension. If you only have point data with z values, and only the spatial analyst extension, you could use the interpolation tools.
... View more
09-02-2010
07:36 AM
|
0
|
0
|
509
|
|
POST
|
Here you are concatenating an integer to a string. This will throw an error. gp.Select_analysis(v8thd_gridCopy_shp, v8thd_gridCopy_Select_shp, "\"FID\" = " + counter ) Try using gp.Select_analysis(v8thd_gridCopy_shp, v8thd_gridCopy_Select_shp, "\"FID\" = " + str(counter) )
... View more
08-12-2010
07:43 AM
|
0
|
0
|
590
|
|
POST
|
Ah, RasterFieldName is not returning the name of the raster it returns the name of a field in a raster catalog. See http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1053&pid=980&topicname=Raster_Catalog_properties Try this import arcgisscripting gp = arcgisscripting.create() raster = r"C:\Temp\lidar" # Create a describe object desc = gp.Describe(raster) # Print the name of the raster print desc.Name Backslashes are special characters, for example print "Foo\nbar" would print foo bar to the screen. The r sets the string to a raw string so r"Foo\nbar" would print Foo\nbar
... View more
07-29-2010
10:08 AM
|
0
|
0
|
1205
|
|
POST
|
Python is backslash sensitive. Try: raster = "C:\\data_all\\AltLatGrids\\ArcGISGrids\\alb8__22" or raster = r"C:\data_all\AltLatGrids\ArcGISGrids\alb8__22"
... View more
07-29-2010
06:50 AM
|
0
|
0
|
1205
|
|
POST
|
This might work.... Use the polygons to clip the lines. Keep only those lines inside the polygons. Convert the polygons to lines and merge the clipped line sections to this new file. Convert the merged lines back to polygons.
... View more
06-29-2010
12:02 PM
|
0
|
0
|
1357
|
|
POST
|
Have a look at Add xy coordinates found in ArcToolbox-Data Management Tools-Features.
... View more
06-22-2010
07:43 AM
|
0
|
0
|
1021
|
|
POST
|
Oh, maybe this script will help you as well. http://arcscripts.esri.com/details.asp?dbid=15569
... View more
05-11-2010
08:56 AM
|
0
|
0
|
1732
|
|
POST
|
At the very least, the lines under your while statements need to be indented.
... View more
05-11-2010
08:50 AM
|
0
|
0
|
880
|
|
POST
|
Maybe this Python script will help. You could use it to calculate the volumes above your dem at graduated levels. Then, check the volumes at each graduation to find the level that equals your input volume of water. You now have the elevation that equals your input volume! http://arcscripts.esri.com/details.asp?dbid=14349
... View more
05-04-2010
10:47 AM
|
0
|
0
|
1732
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-26-2025 08:30 AM | |
| 1 | 10-29-2024 03:51 PM | |
| 1 | 06-26-2024 08:32 AM | |
| 1 | 12-06-2023 11:53 AM | |
| 1 | 06-12-2012 07:42 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-15-2026
09:46 AM
|