Public Sub refreshFolders() ' Get ArcCatalog Application Dim pApp As IGxApplication Set pApp = Application ' Get the Catalog Dim pGXCatalog As IGxCatalog Set pGXCatalog = pApp.Catalog ' QI Catalog into GXObject Dim pGXObject As IGxObject Set pGXObject = pGXCatalog ' QI GxObject into GxObjectContainer Dim pGxObjectContainer As IGxObjectContainer Set pGxObjectContainer = pGXObject ' Get Gxobjects as an enumerate Dim pEnumGxObject As IEnumGxObject Set pEnumGxObject = pGxObjectContainer.Children ' Cycle through objects until we find the Folder Connections, then break out of loop Dim pGxObject2 As IGxObject Set pGxObject2 = pEnumGxObject.Next Do While Not pGxObject2 Is Nothing If TypeOf pGxObject2 Is IGxFolderConnections Then Exit Do End If Set pGxObject2 = pEnumGxObject.Next Loop ' Re-point GxObjectContainer to folder connection GxObject and refresh all children GxObjects Set pGxObjectContainer = pGxObject2 Set pEnumGxObject = pGxObjectContainer.Children Set pGxObject2 = pEnumGxObject.Next Do While Not pGxObject2 Is Nothing pGxObject2.Refresh Set pGxObject2 = pEnumGxObject.Next Loop End Sub
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.