I'm working on a script to update all my broken links in my mxd's do to server and folder changes. Some of these changes are from one data type to another. I'm working my way thru the various combinations, and now working on an old SDE to FGDB. Unfortunately the name in my Table of Contents is still called the default SDE connection name (e.g. SDE_COMMON.SDEWILD.NED_HILLSHADECLIP). I would like to rename this in the TOC to just NED_HILLSHAPECLIP in this case.
In short, I need to replace my "lyr.name" with "lyr.datasetName"
Is there a way to do this in python?
I am trying to keep my script/tools 10.2.2 compatible.