The Domain.Values method gets the values associated with a named field domain as a dictionary.
Declaration
public Dictionary<IConvertible, IComparable> Esri.ArcGISForAutoCAD.Domain.Values(Document doc, string domainName)
Parameters
| Type | Name | Description | Required |
|---|---|---|---|
Document | doc | The AutoCAD document to act on. | required |
string | domainName | An existing field domain name in the drawing. | required |
Returns
| Type | Description |
|---|---|
Dictionary<IConvertible, IComparable> |
|
Remarks on error conditions
This method may throw an exception or return null if a parameter is invalid.
Example 1
Print the range domain values for a field controlled by the Diameter field domain.// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;
// Get the domain values
var domainValues = Esri.ArcGISForAutoCAD.Domain.Values(doc, "Diameter");
// Print the domain values
foreach (var value in domainValues)
{
doc.Editor.WriteMessage("\n" + value);
}
/* Example output
[Min, 12]
[Max, 50]
*/
Example 2
Print the coded value domain values for a field controlled by the ShelterCode field domain.// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;
// Get the domain values
var domainValues = Esri.ArcGISForAutoCAD.Domain.Values(doc, "ShelterCode");
// Print the domain values
foreach (var value in domainValues)
{
doc.Editor.WriteMessage("\n" + value);
}
/* Example output
[1, Open]
[2, Closed]
[3, Full]
[4, Alert]
[5, Standby]
[6, Unknown]
[0, ]
*/
See also
Domain.Names—A .NET method that return the names of field domains defined in the drawing as a collection of strings.
esri_domain_values_get—An AutoLISP function that gets the values associated with a named field domain as an associated list.