I'm looking for a way to automate the deletion of drawing / graphic objects in data (not page layout) view.
I've investigate using the GraphicElement object - but this does not seem to recognise any features drawn in data view (ie if I use ListLayoutElements on objects drawn in data view, nothing is returned, but it will return objects drawn in page layout view).
If I can find some way to identify the elements in data view, I should be able to use the delete() method to get rid of them.
Arcpy.mapping only allows you to clone/delete graphic elements on a layout. I believe the only other way to accomplish what you need is with ArcObjects.
If the purpose of this tool is to 'clean' documents of un-needed graphics, perhaps an alternative approach may work? (i.e. use arcpy.mapping to copy all the layers to a new temporary document, saving it, closing the original document and re-naming the new document to the old documents name. This would effectively get rid of the graphics but keep the layers?
Tim - that is a very good solution and I'll investigate that. I'll need to put some thought into it as the script needs to be executed from inside the mxd, but if I can get over that hurdle, we could be in business.