|
POST
|
Hello, This is a known issue (NIM065009) and the planned fix will be for 10.1. We are only able to reproduce the issue for group layers. If you are having a problem with non-group layers, please send me (jbarrette@.esri.com) a map package so I can look into it further. Thanks, Jeff
... View more
08-01-2011
09:01 AM
|
0
|
0
|
1049
|
|
POST
|
I wish I had something for you. You may want to try the editing forum. http://forums.arcgis.com/forums/116-Editing Jeff
... View more
07-29-2011
06:18 AM
|
0
|
0
|
4072
|
|
POST
|
Gordon, findAndReplaceWorkspacePaths is very sensitive to the strings that you pass in because it is simply doing a find and replace. In your cases below, the strings are different so you have to run the same function multiple times, once for each possible combination. There are several ways to play with the strings to make them the same but that would be even more work. I'm not familiar with your 4th workspace being a possible workspace path value. That appears odd. Another method to use would be the Layer class .replaceDataSource function. This way you can simply override the original workspace with the new workspace. A nice help topic that addresses these issues is: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Updating_and_fixing_data_sources_with_arcpy_mapping/00s30000004p000000/ Jeff
... View more
07-28-2011
06:38 AM
|
0
|
0
|
574
|
|
POST
|
When you enable Data Driven Pages and the data frame goes off the map, is it the data frame object that physically moves off the map or is the data extent changing to an area where there are no visible layers. Can you click the Next Page button or type in a page to get to an extent with features. Please send me a map package to jbarrette@esri.com Thanks, Jeff
... View more
07-27-2011
06:23 AM
|
0
|
0
|
702
|
|
POST
|
This topic is going off on a tangent from the original title but ... Have you tried looking at the following help topic: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Customizing_your_map_extent/00s900000011000000/ Review the "Other Data Frame" section. Jeff
... View more
07-26-2011
01:22 PM
|
0
|
0
|
850
|
|
POST
|
Just as an FYI. If you highlight your code and click the # button it will wrap your code in special CODE tags so you don't lose the python indentation. For example - not 100% sure I got your indents correct: # Import Modules
import arcpy, os
# Set Variables
mxdpath = r'FULL PATH TO MXD FILE' # string
outputfolder = 'FULL PATH TO OUTPUT FOLDER' # string
namefield = 'THE FIELD CONTAINING THE NAME OF THE RESULTING PDF FILE' # string
queryfield = 'THE FIELD CONTAINING THE VALUE FOR THE DESIRED QUERY' # string
layers = ['LIST','OF','LAYERS'] # list
mxd = arcpy.mapping.MapDocument(mxdpath)
# Start Loop through Data Driven Pages
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1)
mxd.dataDrivenPages.currentPageID = pageNum # set the current page
pageName = mxd.dataDrivenPages.pageRow.getValue(field) # get the pageName
pageName += '.pdf' # add '.pdf' extension for file name
pdf = os.path.join(outputfolder, pageName) # add pageName to output folder to get full output path
# Start Loop through all layers of mxd file
for lyr in arcpy.mapping.ListLayers(mxd) # for every layer in mxd's Layer List
if lyr.name in layers: # if layer name in user input list above
value = mxd.DataDrivenPages.pageRow.getValue(queryfield) # get value of query field
if lyr.defintionQuery == True: # if a defintionQuery Exsts...
query = lyr.defintionQuery + "AND QueryField = \'%s\'" % (value) # Add new to old
else:
query = "QueryField = \'$s\'" % (value) # else create a new query
lyr.defintionQuery = query # set the layers defintionQuery
else:
print 'Next' # else print next, this isn't necassary, but its a good place holder
arcpy.mapping.ExportToPDF(mxd, pdf) # export the current Page to pdf
del mxd, lyr, pageName, pageNum, query, value
... View more
07-26-2011
06:53 AM
|
0
|
0
|
559
|
|
POST
|
Have you tried working with Page Definitions? See the help topic: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00sr00000004000000.htm Jeff
... View more
07-21-2011
01:43 PM
|
0
|
0
|
587
|
|
POST
|
This is not out of the box functionality. This could be customized, the way you describe using ArcObjects. At 10.1 there will be a way to do this with Python Addins. At 10.0 you could create a script tool that lists the unique page names/numbers, your user could select the value and via arcpy.mapping you could update the layout based on the page selected. There are some sample scripts that do similar things in Resource Center. Jeff
... View more
07-21-2011
01:39 PM
|
0
|
0
|
566
|
|
POST
|
Have you tried using the Eliminate function. Is was built for this purpose. Here is the summary: Eliminates polygons by merging them with neighboring polygons that have the largest area or the longest shared border. Eliminate is often used to remove small sliver polygons that are the result of overlay operations, such as Intersect or Union. Jeff
... View more
07-18-2011
06:36 AM
|
0
|
0
|
684
|
|
POST
|
Your code is doing 2 different forms of zoom. df.zoomToSelectedFeatures zooms to selected features in ALL layers. df.extent = lyr.getSelectedExtent() zooms to features ONLY in that layer. It would make sense that you get different results if you sometimes have other selected features. Jeff
... View more
07-16-2011
11:41 AM
|
0
|
0
|
716
|
|
POST
|
Arcpy.mapping would be a much easier solution. Take a look at the DataDrivenPages and PictureElements class help topic for some sample code snippets. Basically you will use the DDP object to advance your pages and at each page you will reference each PictureElement and change the sourceImage property. Jeff
... View more
07-16-2011
10:40 AM
|
0
|
0
|
492
|
|
POST
|
I don't believe this can be done with dynamic text but can easily be done with Python. now - timedelta(days=3)
... View more
07-08-2011
06:11 AM
|
0
|
0
|
527
|
|
POST
|
There is not a way to change page size at 10.0 (or 10.1). This is an MXD authoring step. If you are trying to simulate a map book or some page series that have different pages sizes or page orientations you must build those templates and have your arcpy.mapping application reference the appropriate mxd. The following help topic shows and example with facing pages. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_a_map_book_with_facing_pages/00s90000002p000000/ Jeff
... View more
07-06-2011
01:49 PM
|
0
|
0
|
629
|
|
POST
|
I think the problem here is that you are mixing symbology renderers and this can't even be done in the UI. For example, in the UI, add an RGB Composite raster. Then try to set its datasource to just one of the bands (via the Source tab). It won't let you. If you set the symbology properties to be Stretched first (must click OK), then you can change the source to a specific band. You need to author two different layer files. One for Composite and one for Stretched. Don't try to update a composite with a stretched layer file. I hope this helps, Jeff
... View more
06-24-2011
08:47 AM
|
0
|
0
|
582
|
|
POST
|
I'm not sure what "tool" you are referring to but have you looked at the arcpy.Polygon function? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000n1000000.htm Jeff
... View more
06-24-2011
07:07 AM
|
0
|
0
|
796
|
| 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 |
3 weeks ago
|