Creating a SDE connection file in ArcPyĪt this point, it might be easier to open ArcCatalog, create the SDE connection file, and point your script to it. There are many reasons why the documented approach might not meet our needs: We want everything inside one script without any related files required We don’t know the new version name in advance We want to run on Linux (ArcGIS server) Or we simply just want the option to use a single script for our scripty stuff. The current documented approach is to use Toolbox tools or create the version in advance, create a connection file pointing to a version, and use this as a reference in a script. There currently isn’t an ArcPy function to connect to SDE within code, or to deal with new/changing versions. Well, ArcPy isn’t really designed for that approach. At first glance this should be pretty straight forward - provide some connection details and a version name. This post will discuss how to use ArcPy to Connect to SDE, create a new version, and switch to that version all inside a Python script.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |