|
POST
|
I don't know of a way to do this with Python. OLE objects don't have data source properties. A possible alternative would be to save the DOC as a high resolution time and insert it as a picture element. Picture elements have a .sourceImage property that can be changed as you go from page to page. Jeff
... View more
04-26-2012
04:18 PM
|
0
|
0
|
5752
|
|
POST
|
I don't know of a way to dynamically change OLE objects via python. A possible alternative would be to convert each work doc into a high resolution picture. The picture element has a .sourceImage property that would allow you to change out each file. Jeff
... View more
04-26-2012
04:13 PM
|
0
|
0
|
943
|
|
POST
|
Here is a help topic that lists some raster extraction tools. http://resources.esri.com/help/9.3/arcgisengine/java/gp_toolref/geoprocessing/extracting_data.htm Jeff
... View more
04-23-2012
05:58 PM
|
0
|
0
|
681
|
|
POST
|
Or you can also do it with double quotes. Either way, you'll need to use an escape character.
lyr.definitionQuery = "\"CellSiteID\" = '%s'" % pageName
Jeff
... View more
04-20-2012
06:14 AM
|
0
|
0
|
2596
|
|
POST
|
Again, see my last post. I've done this before and it works fine. You need to set the size of the data frame so it is the same aspect ratio as the index polygons PLUS you'll need to do a little math to determine the size of the data frame based on 1:300 scale. Jeff
... View more
04-20-2012
06:11 AM
|
0
|
0
|
5378
|
|
POST
|
I'm not sure I understand this either. Are you trying to get the index polygon to fit perfectly within the data frame extent? If that is the case then you need to make sure the data frame size / aspect ratio is identical to the size of the index polygon. You also need to make sure that "best fit margin" is set to 100%. For example, if the extent rectangle = 1000 meters x 500 meters then the aspect ratio is 2:1 and therefore the dataframe size needs to be 2:1. For example, 4"x2" or 8"x4", etc. If I'm not understanding this correctly, please provide a screenshot with annotations labeling the problem. Thanks, Jeff
... View more
04-19-2012
06:37 AM
|
0
|
0
|
5378
|
|
POST
|
This is a known limitation with OLE Objects and PDFs. Jeff
... View more
04-16-2012
06:21 AM
|
0
|
0
|
2029
|
|
POST
|
There should be no such restriction with findAndReplaceWorkspacePaths. You could replace "C:\" with "D:\" and not have to specifiy the rest of the folder path. I'm curious what you discover as you dig into it a bit futher. Jeff
... View more
04-16-2012
06:17 AM
|
0
|
0
|
1028
|
|
POST
|
Curtis, here is the number you asked for: NIM080006. It is too late for 10.0 SP5 and 10.1 final. The current plan is for 10.1 SP1. Jeff
... View more
04-13-2012
06:59 AM
|
0
|
0
|
1314
|
|
POST
|
At 10.0 you will need to use arcpy.mapping to update the picture as you go from page to page. At 10.1, we've added picture element properties that allow you to reference a field in a table. Here is some sample code for 10.0:
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\project.mxd")
pict = arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "photo")[0]
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
photoField = mxd.dataDrivenPages.pageRow.picture #picture is the name of the field in the index layer
pict.imageSource = photoField
arcpy.mapping.ExportToPDF(mxd, r"C:\Project\OutPut\Output" + str(pageNum) + ".pdf")
del mxd
... View more
04-13-2012
06:11 AM
|
0
|
0
|
731
|
|
POST
|
I could reproduce the issue. The problem is that the lyr.datasetName is, for example, "polygon" and NOT "coverageName\polygon" and lyr.workspacePath does NOT include the coverage name so the missing piece to changing the dataSource is the literal coverage name. I tried an intermediate step. I converted the "to" coverage to a tempory shapefile and successfully redirected the "from" coverage dataSource to the shapefile but I was still unable to go from shapefile back to the "to" coverage. When I specify the literal coverage name as the "dataset_name", I don't get an error but nothing happens. If I enter "polygon" as the dataset_name it remaps to the first coverage in the workspace. The only work around I see is to change the workspace type. I will enter a bug into our system and try to address this for the next SP. Sorry for the inconvenience, Jeff
... View more
04-12-2012
09:00 AM
|
0
|
0
|
1314
|
|
POST
|
Hi Ryan, I tried to reproduce this issue using my data / mxds and could not. I tried on 10.0 SP4 and 10.1. I start with a legend the has 1 column and then load/run your script. Everytime I reload the script into the Python window and run, the legend remains the same. I did notice that you are trying to set both the elementHeight and elementWidth. Since the aspect ratio gets locked, it only make sense to set on. Last one wins. If you want to send me a map package, I'd be happy to give it a test. Jeff
... View more
04-12-2012
07:53 AM
|
0
|
0
|
736
|
|
POST
|
Sure, send me a small zip or map package that includes your simplified script to [email protected] Jeff
... View more
04-11-2012
08:36 AM
|
0
|
0
|
2993
|
|
POST
|
I'm not sure how to do it at 10.0 but at 10.1 we've added a new RasterClassifiedSymbology class to the arcpy.mapping module. Check out the beta help at: http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#/RasterClassifiedSymbology/00s30000005p000000/ I hope this will help, Jeff
... View more
04-11-2012
08:29 AM
|
0
|
0
|
987
|
|
POST
|
For me the thumbnail is being created. I see it in the ArcMap Open MXDs dialog and I also see it in ArcCatalog. But I can repro the "delete thumbnail" button being disabled in the map document properties dialog. I can delete the thumbnail via arcpy and it does get removed. So the issue is the buttons not updating. I will dig into this further. Jeff
... View more
03-28-2012
06:58 AM
|
0
|
0
|
1354
|
| 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
|