I'm trying to create an ArcGIS tool which accepts an SDE connection file as an input. I made a new interface with an input parameter and set the type to Database Connections. When I open the tool and click the "browse" icon, the dialog opens to the Database Connections folder but there is nothing in it. If I navigate to Database Connections in the ArcCatalog window however I see all my usual connection files. Does anyone know why the tool would not be displaying those?
-
1possible duplicate of Definitions of arcgis script parameter Data Type options– blah238Mar 26, 2013 at 22:15
-
Thanks, blah. I took a look at the definitions and see that Database Connections is essentially a reference to the folder, but I don't see why there would be nothing in it. Still hoping for some kind of insight on this.– serverpunkMar 26, 2013 at 22:37
-
Ask ESRI, I have no idea :)– blah238Mar 26, 2013 at 23:28
-
I started a case a case with Esri support - so far there have been no answers. I smell a bug! :D– serverpunkMar 28, 2013 at 17:14
1 Answer
Robercik, it maybe not obvious, but in order to be able to access the ArcSDE geodatabase connections under the Database Connections folder while browsing from a script tool dialog box, you have to make your script parameter to be of Workspace type.
Esri help page on setting script tool parameters. Check the Filter section - when you have a parameter of the Workspace type you can filter what type of workspaces will be available. In your case, you might leave only the Remote Database filter value, which will let the end user see only the ArcSDE connection files either under the Database Connections folder (the default location) or anywhere else on the disk if you would copy them to some other place.
-
I never, EVER would have thought to try Workspace but that's exactly what I needed! Thank you Alex! Mar 28, 2013 at 17:13
-
-
Sorry blah, I think my blinders were on at the time. The Workspace thing just didn't register. Mar 28, 2013 at 21:38