|
POST
|
FYI - The dynamic legend functionality will be available in core Desktop at 10.1. If interested in seeing more, Developer Summit videos will soon be made available at: http://www.esri.com/events/devsummit/videos-and-photos/index.html You'll want to look at the Road Ahead sessions.
... View more
03-14-2011
06:50 AM
|
0
|
0
|
612
|
|
POST
|
Just a note - this thread is getting really fragmented. It is best to create a new thread when the topic is being changed. Here is a response to Christopher. This following code updates the mxd.description import arcpy, os parentDir = r"C:\Demos\MapAutomation\SaveToPDF" for (path, dirs, files) in os.walk(parentDir): >>for filename in files: >>>>if filename.lower().endswith(".mxd"): >>>>>>mxd = arcpy.mapping.MapDocument(os.path.join(path, filename)) >>>>>>print mxd.filePath >>>>>>mxd.description = "python test" >>>>>>mxd.save() Get rid of the ">>" symbols. Hope this helps, Jeff
... View more
03-10-2011
02:33 PM
|
0
|
0
|
1100
|
|
POST
|
Great question, try this: import arcpy, os parentDir = r"c:\some\path" for (path, dirs, files) in os.walk(parentDir): >>for file in files: >>>>if file.lower().endswith(".mxd"): >>>>>>mxd = arcpy.mapping.MapDocument(os.path.join(path, file)) >>>>>>print mxd.filePath Get rid of the ">>" symbols. Hope this helps, Jeff
... View more
03-10-2011
08:37 AM
|
0
|
0
|
3538
|
|
POST
|
This can't be done with only data driven pages, the way it is presented in the user interface. This can be done by introducing arcpy.mapping scripting logic. You can continue to use data driven pages but also add to that scripting logic that reads your other table(s) and update text elements on your page based on information read from the other table(s). Please review the following help topic for more information and also review the help samples: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataDrivenPages/00s300000030000000/ Jeff
... View more
03-10-2011
06:45 AM
|
0
|
0
|
937
|
|
POST
|
Hello Kevin, Have you tried the Find Data Source sample? I think it does exactly what you want. You mention the multi-mxd reporter tool so I assume you are familiar with the arcpy.mapping sample script tools on the resource center. If not, try the following link: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60 Jeff
... View more
03-09-2011
06:53 AM
|
0
|
0
|
922
|
|
POST
|
This is a perfect application of the arcpy.mapping scripting environment. You could loop through a folder of mxds and simply execute the following code. Mxd=arcpy.mapping.MapDocument(path to mxd) Mxd.description = "whatever" there are some great sample tools/scripts available to help you. Go to the resource center and do a search on arcpy.mapping sample script tools Jeff
... View more
03-08-2011
07:12 AM
|
0
|
0
|
1100
|
|
POST
|
Please clarify - does this only happens when you export via a script? If you perform the same export via the user interface (file-->export) do you experience the same performance issue? If so, are you using: arcpy.mapping.ExportToPDF? or mapDoc.dataDrivenPages.exportToPDF? Thanks, Jeff
... View more
03-08-2011
07:04 AM
|
0
|
0
|
1915
|
|
POST
|
We are aware of this issue and are working on a fix. It won't be available for SP2. In order to support some workflows we did not recycle SDE connections with each lyr iteration so lyr.replaceDataSources is creating a new SDE connection with each iteration. The cache is cleared when the script stops running or sometimes when you delete the variable references. Some workarounds are to: 1) Try deleting the lyr variable at the end of each loop. This does not always work. 2) Increase the number of available SDE connections on your server. 3) Decrease the number of layers that are updated within a single loop/script. One example may be that your script iterates through 25 layers at a time. You could have one master script that calls each subscript. Jeff
... View more
02-17-2011
05:34 AM
|
0
|
0
|
1010
|
|
POST
|
Ben, We don't have any methods to check to see if layers are completely displayed. I know you want to avoid introducing delays but have you tried something like: import time time.sleep(5) #5 seconds Does this work? Jeff
... View more
02-03-2011
05:39 AM
|
0
|
0
|
715
|
|
POST
|
We have added a r/o MapDocument.activeDataFrame property to the 10.1 release.
... View more
01-25-2011
06:54 AM
|
0
|
0
|
2217
|
|
POST
|
This can be accomplished using arcy map scripting. Arcpy.mapping works with data driven pages. Here is a very simple example. import arcpy mxd = arcpy.mapping.MapDocument("path to DDP mxd") mainDF = arcpy.mapping.ListDataFrames(mxd, "Main Data Frame")[0] locatorDF = arcpy.mapping.ListDataFrames(mxd, "Locator Data Frame")[0] for DDP_Page in range(1, mxd.dataDrivenPages.pageCount + 1) >>mxd.dataDrivenPages.currentPageID = DDP_Page >>scale = mxd.dataDrivenPages.pageRow.scale >>locatorDF.rotation = scale Then do something like export to PDF. Note: the ">> are spaces because the forum posts strip away leading spaces. Here is a DDP / arcpy.mapping help topic: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataDrivenPages/00s300000030000000/
... View more
01-24-2011
08:43 AM
|
0
|
0
|
676
|
|
POST
|
Hello Brent, I tried to reproduce on my 10.0 SP1 machine. I set up everything like you did and it all worked. Here is my simplified code: import arcpy lyrList = arcpy.GetParameterAsText(0).split(";") mxd = arcpy.mapping.MapDocument(r"c:\temp\brent\brent.mxd") for lyrName in lyrList: lyr = arcpy.mapping.ListLayers(mxd, lyrName)[0] lyr.visible = True arcpy.mapping.ExportToPDF(mxd, r"c:\temp\brent\\" + lyrName + ".pdf") lyr.visible = False Is it possible you have extra spaces in your value list values? I'd be more than happy to send you my toolbox/scripts, etc if that helps. Jeff (jbarrette@esri.com)
... View more
01-21-2011
06:02 AM
|
0
|
0
|
538
|
|
POST
|
2.6.x is required. See the following help topic: http://help.arcgis.com/en/arcgisdesktop/10.0/install_guides/arcgis_desktop_install_guide/index.html#//008700000007000000.htm
... View more
01-14-2011
06:15 AM
|
0
|
0
|
1263
|
|
POST
|
Eric, Arcpy.mapping was designed for automating map documents (mxds) and layer files (lyrs), not the ArcMap application. The functionality you are requesting is crossing into the realm of desktop customization and that is what ArcObjects is for. Jeff
... View more
01-13-2011
07:09 AM
|
0
|
0
|
2914
|
|
POST
|
Luke, The only way I know to make data sources relative is: 1) set the Map Document properties to store relative paths. Each layer in the map document will be relative to the MXD. 2) Use the same setting in the map document and then save layers out to layer files. These can then be added relative to the MXD. When viewing a data source, it will always be the full path. Jeff
... View more
01-12-2011
09:07 AM
|
0
|
0
|
1348
|
| 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 |
a week ago
|