Thursday 22 December 2016

arcobjects - Add-In button Click open ArcCatalog window with list of .sde files



I want code to open ArcCatalog window with list of .sde files.The below code always opens an ArcCatalog window with home location. I have to go to database connections from the window which finally gives me list of .sde files. I want code to show list of .sde files directly on click on Add-In button instead of going to multiple selection options in the window and finally listing the .sde files.


                IGxDialog gxd = new GxDialogClass();
gxd.AllowMultiSelect = false;
gxd.ButtonCaption = "Add";
gxd.RememberLocation = false;

IGxObjectFilter gxObjectFilter = new GxFilterDefaultDatabaseWorkspaces();
gxd.ObjectFilter = gxObjectFilter;

IEnumGxObject gxEnumObj;

gxd.DoModalOpen(ArcMap.Application.hWnd, out gxEnumObj);


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...