|
POST
|
It would be a work around but you could add a field to your table, calculate all values to be the same and then use the unique value renderer to symbolize the single symbol. Jeff
... View more
03-22-2013
06:07 AM
|
0
|
0
|
2923
|
|
POST
|
Gregory, Our fundamental focus with arcpy.mapping is to automate "existing" maps. If arcpy.mapping could be used to completely author a map from scratch then we would need arcpy to do everything that ArcObjects can do and that would be completely redundant. Our goal is to keep arcpy.mapping simple and easy to use. If you could set page size, what would you expect all the existing objects on the layout to do? Should they automatically resize? What would happen if the aspect ratios were different? In ArcMap, if you change page size, your have all the tools at your disposal to make the modifications before printing. Arcpy.mapping doesn't even allow you to create new objects like data frames and north arrows. With these two simple examples alone we would need to more than double the API to support all the possible properties you can imagine that exist in these two objects. This is why we depend on the using the existing ArcMap application to author all this stuff ahead of time and ONLY modify those items that absolutely need to be changed for map automation purposes. Jeff
... View more
03-21-2013
07:22 AM
|
0
|
0
|
2884
|
|
POST
|
A couple of things. First, I'm not seeing in the code below where you are driving the DDP pages. Your script needs to advance each DDP page, perform the custom logic, then continue onto the next page. DDP from the UI can't call custom code. You must write a script that drives both DDP along with your custom logic. Second, your cursor needs to include a query that isolates that particular map_number. For example,
rows = arcpy.SearchCursor(mapLyr.dataSource, "/"map_number/" = "101NW")
Jeff
... View more
03-21-2013
06:33 AM
|
0
|
0
|
1068
|
|
POST
|
There is a very long discussion about this but in summary: page size was left read only by design. Python is NOT designed to be a map document authoring tool. There are 100's of buttons, properties, context menu items, etc that are not exposed to the Python / arcpy.mapping API. Python is not a replacement for ArcObjects. Simply pre-author the mxd(s) with the page sizes you need ahead of time. Jeff
... View more
03-20-2013
06:27 AM
|
0
|
0
|
2884
|
|
POST
|
The layer.description property is the layer's metadata description you would find if you right-clicked on a layer in the TOC, clicked properties and looked at the General tab. At 10.1 a subset of symbology types were exposed: GraduatedColors, GraduatedSymbols, RasterClassified and UniqueValue: http://resources.arcgis.com/en/help/main/10.1/#/GraduatedColorsSymbology/00s30000005z000000/ http://resources.arcgis.com/en/help/main/10.1/#/GraduatedSymbolsSymbology/00s30000005q000000/ http://resources.arcgis.com/en/help/main/10.1/#/RasterClassifiedSymbology/00s30000005p000000/ http://resources.arcgis.com/en/help/main/10.1/#/UniqueValuesSymbology/00s30000005s000000/ If you are using one of these renderers, you can change the labels and/or descriptions. Jeff
... View more
03-20-2013
06:20 AM
|
0
|
0
|
2923
|
|
POST
|
Are you doing anything else to the index layer dynamically while the script is running? I once tried building the index layer on the fly (based on the area of interest) while it was being referenced within the same MXD the script/DDP was working against. The solution was to work build the index using one MXD and the map pages using another MXD (but all with a single script). Please provide more detail. Jeff
... View more
03-19-2013
06:53 AM
|
0
|
0
|
2360
|
|
POST
|
I tried to repro with a text field coded value domain. Once with all unique values and once with duplicate values. Each time I opened the MXD, the DDP field was the same. Please provide a map package if possible. Send to [email protected]. Jeff
... View more
03-18-2013
06:36 AM
|
0
|
0
|
1008
|
|
POST
|
You will need to add a raster layer file that is set to the appropriate renderer. You can use either AddLayer, InsertLayer or UpdateLayer to accomplish this. Jeff
... View more
03-18-2013
06:18 AM
|
0
|
0
|
791
|
|
POST
|
Are you saying that the original MXD does not have "use printer settings" checked on but when you call .saveACopy via arcpy.mapping and save the result out to a 9.3 doc, that setting somehow gets automatically checked and the output then uses those printer page sizes? Are all the original MXDs 9.3? Are any of the MXDs 10x? Do you have the same issue? Thanks, Jeff
... View more
03-13-2013
07:20 AM
|
0
|
0
|
3440
|
|
POST
|
I think it might be much safer to use another field to manage the DDP sequencing and insert your owner name information as dynamic text. If you really want to get fancy with parsing and formatting the strings depending on lengths and number of new lines, then that could be accomplished with arcpy.mapping. Jeff
... View more
03-13-2013
06:09 AM
|
0
|
0
|
2618
|
|
POST
|
Not that I'm aware of. Is it possible to run your scripts on a single 10x machine, change the CSs, and do an MXD.saveAs to 9.3? Jeff
... View more
03-08-2013
08:51 AM
|
0
|
0
|
1250
|
|
POST
|
I'm not clear about your concern (if it is working). As long as your wp variable is pointing to the correct location, you have the workspace type correct and you have a valid data source, it should just work. Jeff
... View more
03-08-2013
08:46 AM
|
0
|
0
|
770
|
|
POST
|
One quick thought. Isn't df = arcpy.mapping.ListDataFrames(mxd, "")[0] looing for a df without a name? Shouldn't you use:
df = arcpy.mapping.ListDataFrames(mxd)[0]
or df = arcpy.mapping.ListDataFrames(mxd, "actual df name goes here")[0]
Jeff
... View more
03-08-2013
07:51 AM
|
0
|
0
|
2061
|
|
POST
|
Another option is to zoom by setting the data frame scale. You can either hard code it or change it relatively. df.scale = df.scale / 2 (zoom in 2x) Also - because you are using "current", don't forget to use arcpy.RefreshActiveView(). Jeff
... View more
03-04-2013
05:35 AM
|
0
|
0
|
784
|
|
POST
|
The only way to change a symbology type in arcpy is via update layer. Can you tell us more about the layer that is failing and the code you are using? Thanks, Jeff
... View more
03-02-2013
08:27 AM
|
0
|
0
|
724
|
| 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
|