|
POST
|
You must author a layer file that points to that other service. You can add that layer file to your MXD using the arcpy.mapping AddLayer function. Jeff
... View more
03-05-2012
05:52 AM
|
0
|
0
|
801
|
|
POST
|
At 10.0, this requires a bit of extra logic but it is possible. You would need to add your layer file multiple times, uniquely name each layer and then check the data frame scale and turn on/off layers. At 10.1, we've exposed the layer scale min/max properties on the Layer object. Jeff
... View more
03-05-2012
05:49 AM
|
0
|
0
|
1651
|
|
POST
|
Unforetunately, parking items off the page is really the only way to do it at 10.0. If your text elements are attribute values, then you may not need to park as many items as you think. I do this all the time with tabular data. I author one element for each column. As I read the data table, I append each value to itself with a newline so the text grows vertically. Set the anchor position to upper left. Check out the following sample that does this: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=8C8E6EB6-1422-2418-A0B8-6AA61BF57894 At 10.1, you will be able to clone existing text and graphic elements. You author the parent text element with all the appropriate properties like size, color, boldness, etc then clone and move each new element into position. Jeff
... View more
03-05-2012
04:59 AM
|
0
|
0
|
1325
|
|
POST
|
I believe we may have addressed this issue at 10.1. The current work around (at 10.0) is to set the extent a second time:
##set extent
newExtent = df.extent
newExtent.XMin = extent[0]
newExtent.YMin = extent[1]
newExtent.XMax = extent[2]
newExtent.YMax = extent[3]
df.extent = newExtent
##set extent (AGAIN)
newExtent = df.extent
newExtent.XMin = extent[0]
newExtent.YMin = extent[1]
newExtent.XMax = extent[2]
newExtent.YMax = extent[3]
df.extent = newExtent
There were situations where the coordinates where too far outside the extent and the aspect ratios didn't align with the data frame extent. Please try running the same code twice. In the case with problem extent, the first time you set extent, it simply brings the extent into view but does NOT set it to the full data frame extent. The second set extent appears to do this. I really hope this helps, Jeff
... View more
03-01-2012
05:42 AM
|
0
|
0
|
1428
|
|
POST
|
At 10.0 building reports with arcpy scripting can be very challenging, but possible, because you would need to set up all the elements in an MXD and automate their dynamic values and placement. The following sample does something similar with dynamic tables: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=8C8E6EB6-1422-2418-A0B8-6AA61BF57894 You could also use 3rd party Python site packages like ReportLab. It is used in the following example: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=FBE3D235-1422-2418-8820-E071ED243854 FYI - At 10.1, we've extended the arcpy.mapping API to include ExportReport. The ExportReport function provides a mechanism to automate the generation of reports that are originally authored in a map document (.mxd) using the reporting tools available in ArcMap. Jeff
... View more
03-01-2012
05:18 AM
|
0
|
0
|
490
|
|
POST
|
Could you please clarify your scenario? I'm not sure what you mean by predefined maximum extent. Are you talking about scale thresholds? Jeff
... View more
02-29-2012
05:22 AM
|
0
|
0
|
1552
|
|
POST
|
There are a couple of statements I'd question. I'd like to see if you have the same issue with the following, simplified code:
import arcpy
path = "XXX"
mxd = arcpy.mapping.MapDocument(path)
for df in arcpy.mapping.ListDataFrames(mxd):
for lyr in arcpy.mapping.ListBrokenDataSources(mxd):
arcpy.mapping.RemoveLayer(df, lyr)
newPath = "YYY"
mxd.saveACopy(newPath)
Also - what SP are you on? We did make some changes to saveACopy in a past MXD. I'll research this a little more. Jeff
... View more
02-28-2012
06:28 AM
|
0
|
0
|
2317
|
|
POST
|
The best option would be to call Support Services. They are well trained at trying to pinpoint the situtation. Jeff
... View more
02-27-2012
05:43 AM
|
0
|
0
|
790
|
|
POST
|
I assume you are using the Grid Index Features tool to automatically generate your index polygons along with page numbering. Couldn't you make a backup copy of your Input Features, modify it to exclude the areas you don't want to generate index areas, and use that layer in the Grid Index Feature tool? Jeff
... View more
02-27-2012
05:30 AM
|
0
|
0
|
3211
|
|
POST
|
Do you have to do it in VBA? You can do it with arcpy.mapping using the layer.visible property. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/ Jeff
... View more
02-23-2012
05:17 AM
|
0
|
0
|
791
|
|
POST
|
These settings are not accessible from Data Driven Pages or the arcpy.mapping API. One possible solution is to have an MXD for each appropriate scale. You could have a DDP MXD for 1:3,000,000 and another for 1:250,000. Simply select the index features for each scale and run your exports. You may want to review the following link on the esri ideas page. I think this is what you are asking for. http://ideas.arcgis.com/ideaView?id=087300000008MmJAAU Jeff
... View more
02-23-2012
05:04 AM
|
0
|
0
|
1715
|
|
POST
|
Have you tried the layer object via arcpy.mapping? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/ Once you reference a layer in a map document you can modify its query definition, for example:
mxd = arcpy.mapping.MapDocument(r"path/to/map.mxd")
lyr = arcpy.mapping.ListLayers(mxd, "some layer name")[0]
lyr.definitionQuery = "[query] = 'here'"
#Do you raster clip here
I'm not clear on your requirements but you may not even need to use a SearchCursor. Simply change the def query in some sort of loop. Jeff
... View more
02-22-2012
05:10 AM
|
0
|
0
|
1109
|
|
POST
|
Have you looked into Data Driven Pages and strip map capabilities? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/An_overview_of_the_Data_Driven_Pages_toolset/007000000008000000/ Jeff
... View more
02-22-2012
05:03 AM
|
0
|
0
|
1229
|
|
POST
|
At 10.0 you can do this with arcpy.mappingUpdateLayer. It requires that you have a pre-authored layer file that you apply to your layer. At 10.1 we've exposed some symbology renderers (e.g., graduated colors) to the API that allow you to change things like number of classes, ranges, labels, etc. Jeff
... View more
02-20-2012
06:47 AM
|
0
|
0
|
809
|
|
POST
|
I suspect the problem is occuring with your "for shp in TOC_shp_list" block. Your second line is stripping away characters from a layer object, not a string. You could change it to something like shp_ext = shp.name[6:] Jeff
... View more
02-20-2012
06:39 AM
|
0
|
0
|
1225
|
| 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
|