0

Is it possible to change the parameters highlighted in the screenshot below? If so which ArcPy function would do this? I know about and do not want to use the function that references .sde files on C:\ In the example below AUWEISQL1 will change I want to AUWEISQL3.

enter image description here

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Dec 4, 2015 at 2:50
1
  • 2
    Your title says "Script for" but your question body says "without using scripts " - which is it? Commented Dec 4, 2015 at 3:02

1 Answer 1

0

In ArcGIS, you add your resources such as feature classes and tables from an enterprise geodatabase stored in a DBMS by using connection files (they have .sde extension). If you need to change the data source of a layer, you need to supply another .sde connection that will have a different server specified.

You cannot change the server you highlighted, because it's a part of the connection configuration which is found in the .sde connection file.

The Source tab shows the information retrieved from the .sde connection file, and you need to modify the connection file itself to make your layer reference another table or another server.

Look at the lyr.workspacePath (access workspacePath of the Map Layer object) which will return a path to .sde connection file:

'C:\\Users\\username\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\[email protected]'

As you have mentioned, you could use findAndReplaceWorkspacePath or replaceDataSource methods to modify the data sources for your layers.

answered Dec 4, 2015 at 6:52
1
  • I had an inkling servers cannot be simply changed as it references the .sde file on each PC. Thankyou Alex for this answer Commented Dec 12, 2015 at 3:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.