AnsweredAssumed Answered

Arcpy.mapping question

Question asked by donalkc on Jul 30, 2013
Latest reply on Jul 30, 2013 by donalkc
Hi all,

I'm having a bit of trouble with this. I'm trying to run a Python code in Pyscripter which at the end select a number of featureclasses in a gdb and adds them to a mxd that I select. The code runs without bringing up any errors but when I open the mxd it hasn't added any layers. The code I'm running is as follows:

mxd = arcpy.mapping.MapDocument("C:/Ireland/Mountains.mxd") df = arcpy.mapping.ListDataFrames(mxd, "*")[0]

I then add layers in the middle section of the code.

At the end of the code I then add:

arcpy.RefreshActiveView() arcpy.RefreshTOC()

But to no avail. Without it bringing up an error message would anybody have any idea what's going wrong?

Thank you,