Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Questions: How are you obtaining the DataFrame object? On the Source tab, is the "Run Python script in process" box checked? Commented Apr 13, 2012 at 17:13
  • @blah238 df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]; Run Python script in process IS checked. Commented Apr 13, 2012 at 17:21
  • And mxd? Are you getting that from arcpy.mapping.MapDocument("CURRENT") like @MC5's example? Commented Apr 13, 2012 at 17:32
  • @blah238 I've used both the arcpy.mapping.MapDocument("CURRENT") and the arcpy.mapping.MapDocument(r'pathName') methods with the same result. Commented Apr 13, 2012 at 17:39
  • A derived parameter will not be added, it must be an output parameter Commented Apr 13, 2012 at 17:47