Skip To Content

Domain.Names (.NET)

The Domain.Names method returns the names of field domains defined in the drawing as a collection of strings.

Declaration

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

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

Returns

TypeDescription

IEnumerable<string>

A collection of all the field domain names defined in the drawing as strings.

Remarks on error conditions

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

Example

Print all the field domain names defined in the drawing.

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

// Get the domain names
var domainNames = Esri.ArcGISForAutoCAD.Domain.Names(doc);

// Print the domain names
foreach (var name in domainNames)
{
  doc.Editor.WriteMessage("\n" + name);
}

/* Example output 
Treatment
Height
YesNo
Diameter
UtilityPoles_TypeDomain
*/

See also

Domain.Get—A .NET method that returns the properties of a named field domain as a dictionary.

Domain.Values—A .NET method that gets the values associated with a named field domain as a dictionary.

esri_domain_names—An AutoLISP function that returns the names of field domains defined in the drawing as a list of strings.