|
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
|
2422
|
|
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
|
1311
|
|
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
|
1025
|
|
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
|
2657
|
|
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
|
898
|
|
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
|
822
|
|
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
|
1668
|
|
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
|
3655
|
|
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
|
1758
|
|
POST
|
Hello Cosmin, I'm not sure I completely understand the workflow, you please confirm or clarify the following: - You open an MXD (in the ArcMap application). - Next you add some script tools to the Catalog Window (but you mention ArcCatalog, not Catalog Window) - I'm not sure what you mean by append. - you do a saveACopy (to a different mxd) - then you close the ArcMap application, - reopen the same MXD and the toolbox is not available. I.e., you must add it again. Question: if you do the same thing with File-->SaveACopy, do you get the same behavior? Thanks, Jeff
... View more
01-10-2011
06:52 AM
|
0
|
0
|
924
|
|
POST
|
Here is the correct link. http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60 Sorry for the confusion, Jeff
... View more
01-10-2011
06:37 AM
|
0
|
0
|
4195
|
|
POST
|
The following is a link to some sample scripts on the Resource Center: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60 It contains one script called Multi-MXD report. It writes a bunch of MXD information to a text file (including file path). This should help you get going. Jeff
... View more
01-09-2011
07:49 AM
|
0
|
0
|
4195
|
|
POST
|
Francis, At 10.0, if your mxd is in page layout view, the mxd.activeView returns "PAGE_LAYOUT" (and not the active data frame within the layout). You would need to find the data frame by name (or loop through each df) and return the rotation accordingly. If you are in data view, the mxd.activeView returns the active dataframe. At that point you can get the df.rotation value. At 10.1 we plan to introduce a new MapDocument property called ActiveDataFrame which will be r/o and will return a reference to a data frame object regardless of data view or layout view. Jeff
... View more
01-07-2011
06:20 AM
|
0
|
0
|
519
|
|
POST
|
John, The first code sample in the MapDocument Class help shows how to do this. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/MapDocument/00s30000000n000000/ Jeff
... View more
01-04-2011
07:14 AM
|
0
|
0
|
2657
|
|
POST
|
Michael, This special formating can't be done within a dynamic tag. There are not built in options to strip away characters using some pre-determined logic. This could be done using basic Python string manipulation but that would require that you replace the dynamic tags with scripting logic and use arcpy.mapping to generate your output. The maps would need to be generated using a script as opposed to it being dynamic within the user interface. If this is a direction you want to go, I could provide you with some of the logic. Jeff
... View more
12-30-2010
07:10 AM
|
0
|
1
|
1437
|
| 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 |
2 weeks ago
|