|
POST
|
The following group in ArcGIS Online: http://www.arcgis.com/home/group.html?owner=MapAutomationTeam&title=arcpy.mapping%20%2F%20Map%20Automation Have two samples involving dynamic tables: http://www.arcgis.com/home/item.html?id=3a525b986b774a3f9cbbd8daf2435852 http://www.arcgis.com/home/item.html?id=af4fe32a93554eadbd3be3b0e55326be Jeff
... View more
02-28-2013
05:14 AM
|
0
|
0
|
3469
|
|
POST
|
I'm an arcpy.mapping kind of guy, I'll embarrass myself if I try to answer a question on android. I think there are much better forums for this specific question. I found: http://forums.arcgis.com/forums/139-ArcGIS-Runtime-SDK-for-Android and here is a specific discussion on the topic: http://forums.arcgis.com/threads/68683-switching-base-map-on-android Sorry I can't be of further help, Jeff
... View more
02-27-2013
05:47 AM
|
0
|
0
|
1328
|
|
POST
|
Would it be possible to send me a map package. Send to [email protected] Thanks, Jeff
... View more
02-26-2013
11:39 AM
|
0
|
0
|
2640
|
|
POST
|
I just tested this bug again using the original bug data and can NOT reproduce the problem using 10.1 SP1. Its possible you have a different situation. Please provide more details including part of your script. Jeff
... View more
02-26-2013
11:32 AM
|
0
|
0
|
2636
|
|
POST
|
You would need to use something like Python add-ins in order to trap a click event. You will also want to use arcpy.mapping UpdateLayer. The problem is that you would need to pre-publish layer files for each possible basemap. In this case, they wouldn't need to type in a URL but rather pick from a list of basemap names. Jeff
... View more
02-26-2013
05:11 AM
|
0
|
0
|
1328
|
|
POST
|
Is it possible that you have upLayer and scrLayer reversed? I see you are adding the source layer to the MXD, not the update layer. The layer you want to update needs to be in the mxd, the source layer does not. Jeff
... View more
02-25-2013
05:15 AM
|
0
|
0
|
1230
|
|
POST
|
Would it be possible for you to send me a map package for evaluation? Please send to [email protected] Jeff
... View more
02-20-2013
10:02 AM
|
0
|
0
|
2124
|
|
POST
|
Unfortunately arcpy.mapping can't work with the stretched renderer. Rather than the raster being a permanent layer in the MXD, what if you tried adding and deleting it with each page? Below is a sample snippet of code from the arcpy.mapping DDP Class help topic that I modified to add/remove your raster between DDP pages. It just requires that you save your raster out as a layer file. import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\ParcelAtlas.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] rasLyrFile = arcpy.mapping.Layer(r"C:\Project\Data\Basemap.lyr") for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum arcpy.mapping.AddLayer(df, rasLyrFile, "BOTTOM") #You can use InsertLayer for more precise placement mxd.dataDrivenPages.exportToPDF(r"C:\Project\Output\Page" + str(pageNum) + ".pdf", "CURRENT") arcpy.mapping.RemoveLayer(df, rasLyrFile) del mxd Jeff
... View more
02-08-2013
05:53 AM
|
0
|
0
|
3129
|
|
POST
|
I looks to me that your workspace is not path to the folder containing the shapefiles but rather pointing to the shapefile itself. Don't you want to use data_path instead? Here is an example. I have a workspace ("C:\Temp") with two shapefiles: "Lakes.shp" and "NewLakes.shp". My MXD has a LAKES layer that points Lakes.shp and I want to change it to NewLakes.shp. Here is the code:
mxd = arcpy.mapping.MapDocument(path to mxd)
lyr = arcpy.mapping.ListLayers(mxd, "LAKES")[0]
lyr.replaceDataSource(r"C:\Temp", "SHAPEFILE_WORKSPACE", "NewLakes")
mxd.save()
The first parameter is the path to the shape file folder (c:\temp), the third parameter is to the NewLakes shapefile, notice I'm not using the ".shp". Do have to because it is a shapefile workspace. Jeff
... View more
02-08-2013
05:22 AM
|
0
|
0
|
910
|
|
POST
|
I'm not sure what you mean by "rasters do not scale to the current display extent". If the rasters are symbolized with a raster classified renderer you may be able to call .Refresh() to get what you want. Take a look at: http://resources.arcgis.com/en/help/main/10.1/#/RasterClassifiedSymbology/00s30000005p000000/ Jeff
... View more
02-06-2013
07:21 AM
|
0
|
0
|
3129
|
|
POST
|
This issue was addressed with 10.1 SP1. The same problem occured with changing data sources for Coverages. The issue was that the feature class name was "Polygon" not CAD name\Polygon or Coverage Name \ Polygon. Here is some test code that is used to verify the fix. Notice the dataset name parameter syntax.
import arcpy, os, sys
relpath = os.path.dirname(sys.argv[0])
mxd = arcpy.mapping.MapDocument(relpath + "\\CoverageAndCAD_DataSources.mxd")
covLyr = arcpy.mapping.ListLayers(mxd)[0]
cadLyr = arcpy.mapping.ListLayers(mxd)[1]
covLyr.replaceDataSource(covLyr.workspacePath, "ARCINFO_WORKSPACE", "basin_utmcopy/Polygon")
if "utmcopy" in covLyr.dataSource:
print "COVERAGE: PASSED"
else:
print "COVERAGE: FAILED"
cadLyr.replaceDataSource(cadLyr.workspacePath, "CAD_WORKSPACE", "ParcelsCopy.dwg/Polygon")
if "ParcelsCopy" in cadLyr.dataSource:
print "CAD PASSED"
else:
print "CAD: FAILED"
Please confirm that this helps you, Jeff
... View more
02-04-2013
07:09 AM
|
0
|
0
|
2331
|
|
POST
|
Nice idea to create a video. Have you considered using a point in polygon overlay tool like intersect? This would allow you to tranfer your attributes. You may get more stuff than you need but you can always delete the duplicate fields. Jeff
... View more
02-01-2013
04:39 AM
|
0
|
0
|
2265
|
|
POST
|
There are two relevant samples: http://www.arcgis.com/home/item.html?id=0ba4fd37e2e54f65b3edf6478e8cc30a http://www.arcgis.com/home/item.html?id=3a525b986b774a3f9cbbd8daf2435852 Jeff
... View more
01-24-2013
05:33 AM
|
0
|
1
|
3220
|
|
POST
|
I was able to change the symbol properties via the layer properties "Labels" tab (not the symbology tab). In the Labels tab: - Turn on "Label features in this layer" - Set the symbol to be an interstate symbol - Set placement properties to be on top of the feature. One possible thing that you did was you set the feature symbology to be a highway shield (and not the label symbology). I hope this helps, Jeff
... View more
01-22-2013
06:05 AM
|
0
|
0
|
3626
|
|
POST
|
Have you looked at this facing pages example. The sample uses two different MXDs similar to what you are trying to do. http://resources.arcgis.com/en/help/main/10.1/#/Creating_a_map_book_with_facing_pages/00s90000002p000000/ Jeff
... View more
01-22-2013
05:55 AM
|
0
|
0
|
1536
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-05-2025 11:20 AM | |
| 3 | 06-05-2025 09:21 AM | |
| 1 | 05-14-2025 01:19 PM | |
| 2 | 04-24-2025 07:54 AM | |
| 1 | 03-15-2025 07:19 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-23-2026
10:29 AM
|