Skip To Content

WebFeatureLayer.Names (.NET)

WebFeatureLayer.Names 方法将以字符串集合的形式检索当前工程图中 web 要素图层的名称。

声明

public IEnumerable<string> Esri.ArcGISForAutoCAD.WebFeatureLayer.Names(Document doc)

参数

类型名称描述必填

文档

doc

要进行操作的 AutoCAD 文档。

必填

返回

类型描述

IEnumerable<string>

字符串形式的 web 要素图层名称的集合。

错误条件备注

如果参数无效,则此方法可能会抛出异常或者返回空或 null

示例

打印工程图中的 web 要素图层名称。

// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;

// Get the web feature layer names
var wflNames = Esri.ArcGISForAutoCAD.WebFeatureLayer.Names(doc);

// Print the web feature layer names
foreach (var name in wflNames)
{
  doc.Editor.WriteMessage("\n" + name);
}

/* Example output
Facilities
Has_Permit
No_Permit
Shelters
*/

另请参阅

FeatureLayer.Names - 此 .NET 方法用于检索工程图中文档要素图层名称和 Web 要素图层名称的字符串集合。

DocFeatureLayer.Names - 此 .NET 方法用于检索工程图中文档要素图层名称的字符串集合。

esri_webfeaturelayer_names - 此 AutoLISP 函数用于返回工程图中 web 要素图层名称的字符串列表。