本文整理汇总了C#中IWorkspace.Exists方法的典型用法代码示例。如果您正苦于以下问题:C# IWorkspace.Exists方法的具体用法?C# IWorkspace.Exists怎么用?C# IWorkspace.Exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWorkspace
的用法示例。
在下文中一共展示了IWorkspace.Exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getElementINames
/// <summary>
/// returns a dictionary of elements by name/ elementobject
/// </summary>
/// <param name="geoDatabase">Iworkspace</param>
/// <param name="dtype">data type</param>
/// <returns>dicitonary key=name value=IName object</returns>
public Dictionary<string, IName> getElementINames(IWorkspace wks, esriDatasetType dtype)
{
Dictionary<string,IName> lstFeatureClasses = new Dictionary<string,IName>();
if (wks.Exists())
{
esriDatasetType dttype = esriDatasetType.esriDTAny;
IEnumDataset eDatasets = wks.get_Datasets(dttype);
IEnumDataset eDatasets2;
IDataset dataset2;
IDataset dataset = eDatasets.Next();
while (dataset != null)
{
dttype = dataset.Type;
switch (dttype)
{
case esriDatasetType.esriDTFeatureDataset:
eDatasets2 = dataset.Subsets;
dataset2 = eDatasets2.Next();
while (dataset2 != null)
{
if (dataset2.Type == dtype)
{
lstFeatureClasses.Add(dataset2.BrowseName, dataset2.FullName);
}
dataset2 = eDatasets2.Next();
}
break;
default:
if (dttype == dtype)
{
lstFeatureClasses.Add(dataset.BrowseName, dataset.FullName);
}
break;
}
dataset = eDatasets.Next();
}
}
return lstFeatureClasses;
}
开发者ID:GeospatialDaryl,项目名称:USFS_RMRS_FunctionalModeling_RasterModeling,代码行数:47,代码来源:geodatabaseutility.cs