This function gets the values associated with a named field domain as an associated list.
Syntax
(esri_domain_values_get domain)
Arguments
- domain | string | required | An existing field domain name in the drawing.
Example usage 1
Attempt to get the range domain values for a field controlled by the field domain called PoleHeight.(esri_domain_values_get "PoleHeight")
Result example usage 1
Returns the range domain values for a field controlled by the field domain called PoleHeight as an associated list.
(("MIN" . 45.0) ("MAX" . 70.0))
Example usage 2
Attempt to get the coded value domain values for a field controlled by the field domain called PoleMaterial.(esri_domain_values_get "PoleMaterial")
Result example usage 2
Returns the coded domain values for a field controlled by the field domain called PoleMaterial as an associated list. The first part of the dotted pair is the code value and the second part of each pair is the description value. The coded value will be of the same value type as the field type. The coded value can be of the same or different type, such as an integer code value that is associated with a string value description as in this case.
((1 . "Steel") (2 . "Composite") (7 . "Wood") (12 . "Concrete"))
Return values
The following are the possible return values:
- If successful, returns the domain values as an associated list of dotted pairs defined as follows:
- Range domain values are returned as an associated list containing the minimum and maximum values as dotted pairs: (("MIN" . 45.0) ("MAX" . 70.0))
- Coded value domain values are returned as an associated list containing a dotted pair of the coded value and a coded value description. The coded value will be of the same type as the field type. The coded value description can be of the same or different type, such as an integer code value that is associated with a string value description.
- If failed, it returns a list with the first value of nil and then an associated list containing the key value "Error" and an associated error message as a string: (nil ( "Error" . "<message>")).
Failed return values
Failed return values can occur for any of the following reasons:
- (nil ("Error" . "No domains found"))
The specified field domain name was not found in the drawing.
- (nil ("Error" . "Missing required argument"))
The incorrect number of arguments were passed to the function.
See also
esri_domain_get | This function returns the properties of a named field domain as an associated list.
esri_domain_names | This function returns a list of field domain names defined within the drawing as a list.