Skip To Content

WebFeatureLayer.Names (.NET)

The WebFeatureLayer.Names method retrieves the names of the web feature layers in the current drawing as a collection of strings.

Declaration

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

Parameter

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

Returns

TypeDescription

IEnumerable<string>

A collection of web feature layer names as strings.

Remarks on error conditions

This method may throw an exception or return empty or null if a parameter is invalid.

Example

Print the web feature layer names in the drawing.

// 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
*/

See also

FeatureLayer.Names—A .NET method that retrieves a collection of strings of the names of the document feature layers and web feature layers in the drawing.

DocFeatureLayer.Names—A .NET method that retrieves a collection of strings of the names of the document feature layers in the drawing.

esri_webfeaturelayer_names—An AutoLISP function that returns a list of strings of the names of the web feature layers in the drawing.