Skip To Content

FieldDefinition.Names (.NET)

The FieldDefinition.Names method returns a collection of field names for an existing document or web feature layer.

Declaration

public IEnumerable<string> Esri.ArcGISForAutoCAD.FieldDefinition.Names(Document doc, string flName)

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

string

flName

An existing feature layer name in the drawing.

required

Returns

TypeDescription

IEnumerable<string>

A collection of field names as strings.

Remarks on error conditions

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

Example

Print the field names from the Manholes feature layer.

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

// Get the field names
var fieldNames = Esri.ArcGISForAutoCAD.FieldDefinition.Names(doc, "Manholes");

// Print the field names
foreach (var fieldName in fieldNames)
{
  doc.Editor.WriteMessage("\n" + fieldName);
}

/* Example output
EntityHandle
EntityType
Type
Manufacturer
Diameter
*/

See also

esri_fielddef_names—An AutoLISP function that returns a list of field names for an existing document or web feature layer.