timothieb

overwriteOutput - beginner question

Discussion created by timothieb on Oct 20, 2011
Latest reply on Oct 20, 2011 by timothieb
Hello -

I am trying to adapt a script I found on ArcGIS Resource Center (Thanks ArcGIS Resource Center!). The script exports a pdf from an mxd. Currently if a pdf already exists with the same name it is overwritten - I would like it NOT to do this.

The relevant line of code is:
arcpy.overWriteOutput = 1

I have tried combinations of the following but can't get this to work:
changed 1 to 0
changed 1 to False
changed case of function to overwriteOutput
changed to arcpy.env

I also noticed that in the ArcMap Python interactive window if I type in arcpy.env.o to get the correct syntax/help both overWriteOutput and overwriteOutput are listed and in the help window one produces the word True and the other False!

Going slightly crazy now!

Can anyone tell me what I am doing wrong or suggest another way to stop the file being overwritten.

Thanks
Tim

Outcomes