Skip To Content

FeatureLayer.Get (.NET)

The FeatureLayer.Get method returns a dictionary of feature layer properties.

Declaration

public Dictionary<string, string> Esri.ArcGISForAutoCAD.FeatureLayer.Get(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

Dictionary<string, string>

A dictionary of feature layer properties, which may include the following:

  • Key: NAME, Value: The name of the feature layer.
  • Key: GEOMTYPE, Value: The feature layer geometry type ("Polygon", "Polyline", "Point", "Multipatch", or "Annotation").
  • Key: TYPEFIELD, Value: If the feature layer has subtypes, this is the name of the field that subtypes are based on; otherwise, it is omitted.
  • Key: FLTYPE, Value: The document or web feature layer type.

Remarks on error conditions

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

Example

Print the feature layer properties for the Buildings feature layer.

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

// Get the feature layer properties
var buildingsProperties = Esri.ArcGISForAutoCAD.FeatureLayer.Get(doc, "Buildings");

// Print the properties
foreach (var property in buildingsProperties)
{
  doc.Editor.WriteMessage("\nKey = {0}, Value = {1}", property.Key, property.Value);
}

/* Example output
Key = NAME, Value = Buildings
Key = GEOMTYPE, Value = Polygon
Key = TYPEFIELD, Value =
Key = FLTYPE, Value = Document
*/

See also

esri_featurelayer_get—An AutoLISP function that returns an associated list of feature layer properties.