Can't disconnect folder (IGxCatalog)

817
1
Jump to solution
02-03-2012 01:20 AM
AndrewEgleton
New Contributor III
Hi,

This should be quite simple, but how can I remove folder connections from IGxCatalog?

I've tried:
ESRI.ArcGIS.Catalog.IGxCatalog catalog = new ESRI.ArcGIS.Catalog.GxCatalogClass(); catalog.Location = "M:\\"; catalog.DisconnectFolder("M:\\");

but the connection to M:\ remains after running the code.
0 Kudos
1 Solution

Accepted Solutions
AndrewEgleton
New Contributor III
Found an answer: http://forums.arcgis.com/threads/35682-Create-Connection-Folder-in-ArcCatalog-through-ArcMap-VB.NET?...

dded 2 lines of code after removing folder connections:

ESRI.ArcGIS.Catalog.IGxCatalog catalog = new ESRI.ArcGIS.Catalog.GxCatalogClass(); catalog.Location = "M:\\"; 

catalog.DisconnectFolder("M:\\"); ESRI.ArcGIS.Catalog.IGxFile gxFile = (ESRI.ArcGIS.Catalog.IGxFile)catalog; gxFile.Save();


Folder connections now are removed permanently.

View solution in original post

0 Kudos
1 Reply
AndrewEgleton
New Contributor III
Found an answer: http://forums.arcgis.com/threads/35682-Create-Connection-Folder-in-ArcCatalog-through-ArcMap-VB.NET?...

dded 2 lines of code after removing folder connections:

ESRI.ArcGIS.Catalog.IGxCatalog catalog = new ESRI.ArcGIS.Catalog.GxCatalogClass(); catalog.Location = "M:\\"; 

catalog.DisconnectFolder("M:\\"); ESRI.ArcGIS.Catalog.IGxFile gxFile = (ESRI.ArcGIS.Catalog.IGxFile)catalog; gxFile.Save();


Folder connections now are removed permanently.
0 Kudos