|
POST
|
I don't see anything wrong with your code. I ran it on some MXDs and it worked as expected. I did have to modify it because it would not run by itself. Layer.longName returns the layer name preceeded by its group layer name (if it exists). Here is the code I ran: import arcpy from arcpy.mapping import * #Brings in entire functionality of the mapping module mxd = MapDocument(r"C:\Temp\Test.mxd") TOClayers = ListLayers(mxd) for layer in TOClayers: print "Layer LongName is : " + layer.longName print "Layer name is : " + layer.name print"\nStart the dataframe loop." dataframes = ListDataFrames(mxd) for frame in dataframes: layers = ListLayers(mxd, '', frame) for layer in layers: print '\nData Frame : ' + frame.name +'\tLayer longName ' + ': ' + layer.longName print 'Data Frame : ' + frame.name +'\tLayer Name ' + ': ' + layer.name Jeff
... View more
07-16-2012
07:28 AM
|
0
|
0
|
1031
|
|
POST
|
Have you tried arcpy.Describe? The following was typed in the Python Window:
>>>mxd = arcpy.mapping.MapDocument("current")
>>>lyr = arcpy.mapping.ListLayers(mxd)[0]
>>> desc = arcpy.Describe(lyr)
>>> print desc.shapeType
Point
... View more
07-12-2012
09:29 AM
|
0
|
0
|
1948
|
|
POST
|
Can you try connecting again? I made the group public (no invite needed). If that doesn't work, then go to ArcGIS Online --> Groups --> Search for "arcpy.mapping". Try opening that group and clicking on the resource titled "MapBookWithGraphicTables_10_v1" Jeff
... View more
07-09-2012
07:07 AM
|
0
|
0
|
1262
|
|
POST
|
This is a bug (NIM082523) and will be addressed for 10.1 SP1. Arcpy is fetching a wrong (null) display transformation from layers generated from GP tools. A possible work around it to reference the layers from within a Map Document. 1) Covert LYR to lyrfile, add to ArcMap TOC and reference it. 2) Use arcpy.mapping.ListLayers on the layer if it is automatically added to the TOC. Thanks for reporting this, Jeff
... View more
07-06-2012
01:29 PM
|
0
|
0
|
2637
|
|
POST
|
My bad, I wrote that help topic. I don't know how else to word it. When you create an SDE connection file, an actual file gets persisted on disk as a .sde file, but the connection information persists "in memory" allowing you to make the connection to SDE. This technique is useful for managing map documents that contain layers that require logins. The 4th sample on the arcpy.mapping.MapDocument object uses this: http://resources.arcgis.com/en/help/main/10.1/#/MapDocument/00s30000000n000000/ Another sample that uses this technique is the 3rd sample on the layer class for arcpy.mapping: http://resources.arcgis.com/en/help/main/10.1/#/Layer/00s300000008000000/ You can remove the temporary file at the end of the script. Jeff
... View more
07-06-2012
07:53 AM
|
0
|
0
|
2051
|
|
POST
|
There is a sample on ArcGIS Online that displays graphic tables, not dynamic tables. In other words, a graphic table with 15 rows and 3 columns is displayed on the layout but the tabular information is dynamic from page to page. We will soon be posting a truely dynamic table sample that is now possible with the new arcpy.mapping 10.1 cloning capabilities. Check out: http://www.arcgis.com/home/item.html?id=af4fe32a93554eadbd3be3b0e55326be Jeff
... View more
07-06-2012
07:42 AM
|
0
|
0
|
1262
|
|
POST
|
My motto has always been, "why do it in the UI, when you can do it with arcpy". Everything you can do with DDP, you can do with arcpy.mapping plus a whole lot more. Couple of things: 1) Curious why mxd = arcpy.mapping.MapDocument(mxd = "CURRENT") works. The parameter name is mxd_path (but that doesn't work). I personally use .MapDocument("CURRENT") 2) Your Layer variable doesn't look right. Try, Layer = arcpy.mapping.ListLayers(mxd, "ImplausibleReads", df)[0] Jeff
... View more
06-27-2012
07:45 AM
|
0
|
0
|
2296
|
|
POST
|
Great question. You may want to post this on the Geoprocessing forum. I think you'll get a much better response. Jeff
... View more
06-27-2012
07:31 AM
|
0
|
0
|
1769
|
|
POST
|
We are not able to build DDP outside of ArcMap. Jeff
... View more
06-26-2012
06:48 AM
|
0
|
0
|
2296
|
|
POST
|
If you want to force something to the console, try something like:
import arcpy, sys
arcpy.env.workspace = r"C:\Temp\BackgroundData_fGDB.gdb"
fcList = arcpy.ListFeatureClasses("*", "ALL")
for fc in fcList:
sys.stdout.write(b +"\n")
... View more
06-26-2012
06:34 AM
|
0
|
0
|
1413
|
|
POST
|
Are you able to edit the annotation FC? I don't know what it could be. You may want to report this to support services. Jeff
... View more
06-26-2012
06:16 AM
|
0
|
0
|
2527
|
|
POST
|
I think the easiest way to accomplish this is through Page Definition Queries. A common workflow. Turn off the Index Layer that is being used to enable DDP. Add the same index layer again and symbolize it the way you want the "selected" index to appear. On that layer, via the Definition Query dialog, set up a Page Definition Query to match your index feature. For more help, check out: http://resources.arcgis.com/en/help/main/10.1/index.html#//00s90000003p000000 Jeff
... View more
06-25-2012
07:27 AM
|
0
|
0
|
733
|
|
POST
|
The Bing maps services issue is fixed with 10.1 SP1 (NIM081549). Jeff
... View more
06-25-2012
07:08 AM
|
0
|
0
|
2433
|
| 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
|