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:
I then add layers in the middle section of the code.
At the end of the code I then add:
But to no avail. Without it bringing up an error message would anybody have any idea what's going wrong?
Thank you,
Dónal
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:
Code:
mxd = arcpy.mapping.MapDocument("C:/Ireland/Mountains.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
At the end of the code I then add:
Code:
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
Thank you,
Dónal