// Create a file geodatabase workspacefactory and open the c:\leo.gdb FGDB FileGDBWorkspaceFactory factory = new FileGDBWorkspaceFactory(); Workspace workspace = new Workspace(factory.openFromFile("c:\\leo.gdb", 0)); // Get all dataset names in the FGDB workspace IEnumDatasetName enumDatasetName = workspace.getDatasetNames(esriDatasetType.esriDTAny); // Open the "myfeaturedataset" and print its browsename IFeatureDataset featDataset = workspace.openFeatureDataset("myfeaturedataset"); System.out.println("The browse name of this FeatureDataset is: " + featDataset.getBrowseName()); // Get all datasets within the "myfeaturedataset" IEnumDataset enumDatasetName2 = featDataset.getSubsets(); // Print all the dataset names in the c:\leo.gdb FGDB IDatasetName dsName = enumDatasetName.next(); while(dsName != null){ System.out.println("Dataset Name: " + dsName.getName()); dsName = enumDatasetName.next(); } // Print the featureclass name residing in the "myfeaturedataset" FeatureDataset IDataset dsName2 = enumDatasetName2.next(); while(dsName2 != null){ System.out.println("FeatureClass Name: " + dsName2.getName()); dsName2 = enumDatasetName2.next(); }
Some how I am doing the same way as you mentioned with the feature dataset.But at this lineIFeatureDataset featDataset = workspace.openFeatureDataset("myfeaturedataset");I am getting the Automation Exception as "Item not found DAO.Fields".
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.