I have created a set of general scripting tools for map automation, etc. In one of my tools a geodatabase is created in the workspace folder the script points to. Just out of curiosity, is there any way I can add a folder connection in the ArcMap catalog window once the GDB is created so the user doesn't have to manually create one (assuming they haven't already done so), or is that out of ArcPy's scope?
Answer
No it is not possible to add "Folder Connections" using Arcpy.
Folder Connections are stored in the ArcCatalog.gx file, which is typically located at
c:\Users\*username*\AppData\Roaming\ESRI\*Desktopverion*\ArcCatalog\ArcCatalog.gx
This is a binary file, so forget about editing it.
The only thing you could possibly do is to create the Folder Connections you want on one PC, copy the ArcCatalog.gx file to a common location, and then have your script replace the local PC copy of ArcCatalog.gx file with the common one.
No comments:
Post a Comment