Can you please post what you get for the variable sdecon?This needs to be a .sde file that you can find in ArcCatalog Add Spatial Database Connection.
If you are using ArcGIS v10.1, I believe you need the full path to the connection file. You have "Database Connections\guana_npwd@usprd06.sde",where I have found at v10.1 you need something like:c:\Users\Roaming\guana_npwd@usprd06.sde (or wherever your SDE connection file is found)
I would open a ticket with ESRI technical support at this point, as they may be able to point you to a simple function that change a feature class name in mxd or layer file besides the replaceDataSource method.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.