|
POST
|
Did you try the steps in the following post: http://forums.arcgis.com/threads/1544-Beta-10-trouble-importing-arcpy-or-arcgisscripting-in-IDLE Jeff
... View more
10-24-2011
10:41 AM
|
0
|
0
|
882
|
|
POST
|
I think I found the issue. The root WMS service layer does not support "ServiceProperties", it is only the sub layers. Individual sub layers can't be removed - that is also the case in the UI. For example, you have: Europe BGR Geology by Age (Geochronologic) - as the root layer - this does not support ServiceProperties but it CAN be removed. Europe BGR 5M Geological Units - Offshore - this is a sub layer under the layer above. This does support ServiceProperties but CAN NOT be removed (just like in the UI). One possible workaround is that you identify the sub-layers but remove the parent. This can be done by using the LYR.longName property which would be: Europe BGR Geology by Age (Geochronologic)\Europe BGR 5M Geological Units - Offshore Find the layer with the root name("Europe BGR Geology by Age (Geochronologic)") and remove that layer. I hope this helps. In the meantime, I'll mark this as a bug and hopefully get it fixed in the next service pack. Jeff
... View more
10-24-2011
09:32 AM
|
0
|
0
|
1781
|
|
POST
|
This is not possible with arcpy.mapping. You would need to author the group structure ahead of time. You could then use arcpy.mapping.AddLayer and arcpy.mapping.AddLayerToGroup to insert layers into your mxd. Jeff
... View more
10-17-2011
07:33 PM
|
0
|
0
|
3236
|
|
POST
|
No there is not. This is a property that would need to be authored in the map document or a layer file ahead of time. If that is not possible, we'd like to learn more about your scenario for possible consideration to future releases. Jeff
... View more
10-14-2011
06:10 AM
|
0
|
0
|
1882
|
|
POST
|
Note - the best, most conistent way to get extent is if you are saving your map document in Layout View. If your map document is in Data View, your extent may change based on the resizing of application windows. Same applies to getting and setting scale. Jeff
... View more
10-14-2011
06:06 AM
|
0
|
0
|
2368
|
|
POST
|
Its all in the help link I provided. The sample does not exercise all parameters but here they are. The help explains each one. Syntax ExportToTIFF (map_document, out_tiff, {data_frame}, {df_export_width}, {df_export_height}, {resolution}, {world_file}, {color_mode}, {tiff_compression}, {geoTIFF_tags}) Jeff
... View more
10-13-2011
06:53 AM
|
0
|
0
|
3940
|
|
POST
|
I don't understand. Now exporting from the UI, the original issue, is no longer the main issue? Did the problem resolve itself? I didn't realize that you had OLE objects in your MXD. OLE objects are only supported with the ArcMap application being open because the OLE information is embedded within the arcmap.exe. You can run your Python scripts from the Python window using "current" but they can't be run outside of ArcGIS (when OLE objects are involved). Jeff
... View more
10-12-2011
07:17 AM
|
0
|
0
|
2941
|
|
POST
|
When the {symbology_only} property on UpdateLayer is set to False, it pulls across ALL layer properties, not just symbology. Have you tried working with the LabelClass object. It allows you to set the expression directly. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/LabelClass/00s30000002t000000/ Jeff
... View more
10-12-2011
05:56 AM
|
0
|
0
|
1882
|
|
POST
|
Can you tell me what the value of your description is? print lyr.description Jeff
... View more
10-11-2011
12:28 PM
|
0
|
0
|
766
|
|
POST
|
Try arcpy.mapping. Check out the help and samples at the following link: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataDrivenPages/00s300000030000000/ I made changes to Sample #1 so you can export just the data frame and I also changed it to ExportToTIFF. import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\NameOfMXD.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Dataframe Name")[0]
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
arcpy.mapping.ExportToTiff(mxd, r"C:\Project\OutPut\Page" + str(pageNum) + ".tif", df)
del mxd
... View more
10-11-2011
11:59 AM
|
0
|
0
|
3940
|
|
POST
|
Jiaorong, Two more questions: 1) What DPI are you exporting the pages out to? If you reduce the DPI, does it get better? 2) As a test, could you try turning off the dem90_shade1 layer and then try? The best way for us to assess what is going on would be to get a copy of your data. Would it be possible to get me a map package or zip file. Please respond directly to [email protected] Thanks, Jeff
... View more
10-11-2011
11:42 AM
|
0
|
0
|
2941
|
|
POST
|
Are you looking for delete_management? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000052000000 Jeff
... View more
10-10-2011
07:02 AM
|
0
|
0
|
1025
|
|
POST
|
Jiaorong, Questions: 1) Are you running out of disk space when producing the output? The first error message suggests that you are. 2) Are you writing to a single PDF file or a PDF file for each map page? 3) When you say it worked up to page 28, does that mean PDF files are being generated? 4) I assume you are doing this from the user interface. Have you tried exporting to PDF via arcpy.mapping? If you are having memory issues, then running an arcpy.mapping script outside of ArcMap may help. If you are running out of disk space, then this won't help at all. The following script will export all your pages into a single PDF: mxd = arcpy.mapping.MapDocument(r"C:\temp\sample[1].mxd")
ddp = mxd.dataDrivenPages
ddp.exportToPDF(r"C:\temp\output.pdf") The following script will export each page to a separate PDF (index # gets appended to the end of each file name: mxd = arcpy.mapping.MapDocument(r"current")
ddp = mxd.dataDrivenPages
ddp.exportToPDF(r"C:\temp\out.pdf", multiple_files="PDF_MULTIPLE_FILES_PAGE_INDEX") Jeff
... View more
10-10-2011
06:56 AM
|
0
|
0
|
2941
|
|
POST
|
Is it possible that your layer description is a number? Could you try changing line 39 to something like: outFile.write("\t\t\t Description: " + str(lyr.description) + "\n") Jeff
... View more
10-08-2011
06:08 PM
|
0
|
0
|
766
|
|
POST
|
My mistake. I included the [0] accidentally. Let me try again: myLayerObj = arcpy.mapping.ListLayers(mxd, "filter")[0] This returns a layer object myLayerListObj = arcpy.mapping.ListLayers(mxd, "filter") This returns a Python list object. If you want to get to items in the list you need to either use and index number or a for loop. If your MXD is designed with all layers having unique names, then if you use the correct filter, you will only have one item in your list and you can use [0] to extract it. There is a new arcpy.mapping tutorial that covers this in much better detail. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Getting_started_with_arcpy_mapping_tutorial/00s30000006w000000/ Jeff
... View more
10-08-2011
06:03 PM
|
0
|
0
|
481
|
| 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 month ago
|