internal static void WriteReferenceTableNamesToConsole(ILocator locator) { var addressLocator = locator as IReferenceDataTables; if (null == addressLocator) return; var referenceDataTables = addressLocator.Tables; IReferenceDataTable referenceDataTable; while (null != (referenceDataTable = referenceDataTables.Next())) { var tableName = (IDatasetName) referenceDataTable.Name; Console.WriteLine(tableName.WorkspaceName.PathName + Environment.NewLine + tableName.Name); try { var referenceTable = (IFeatureClass) ((IName) tableName).Open(); // ... } catch (COMException) { Console.Error.WriteLine(string.Format("Reference data '{0}' for locator '{1}' not accessible!", tableName, locator.Name)); } } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.