Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Open All files in a GDB

$
0
0
Hello!
First of all, sorry but my English. Well, I would like to make a question about how can I add all the layers of a geodatabe in my ArcGIS

I'm creating a form with VB.Net, and I created a button that I would like when I pressed it the layers were added (preferrably not visible) in Arcgis.
Right now, I just achieved to add just one layer....
Here is my code:
Code:

Private Sub cmdConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConnect.Click
        MxDoc = My.ArcMap.Document
        MapFrame = MxDoc.FocusMap
        Dim i As Integer
        Dim intMapCount As Integer
        Wfactory = New FileGDBWorkspaceFactory
        Work = Wfactory.OpenFromFile("C:\Information.gdb", 0)
        FWorkspace = Work
        FData = FWorkspace.OpenFeatureClass("Fields")
        Flayer = New FeatureLayer
        Flayer.FeatureClass = FData
        Flayer.Name = Flayer.FeatureClass.AliasName
        MapFrame.AddLayer(Flayer)
        MxDoc.ActivatedView.Refresh()
    End Sub

So, inside Information.gdb, I have 3 layers(Fields, Boundary and Others), how can I add these 3 layers?.

thank you!

Viewing all articles
Browse latest Browse all 1374

Trending Articles