Creates a new text entity from the content of an existing field of a web or document feature layer. You can link feature attribute field values to most kinds of feature attribute fields. You cannot link reporting fields to text or block attribute values.
Syntax
(esri_label_place flname field feature_ename place_point)
Arguments
- flname | string | required | An existing feature layer name in the drawing.
- field | string | required | The feature attribute field name source for the label.
- feature_ename | string | required | The AutoCAD entity name of the feature to link to the specified text.
- place_point | 3D point | required | 3D Point where the new text label will be placed.
Example usage
Prompts to graphically select a feature of the Parcels feature layer and then specify the location of a new text entity, and link the Owner field's value to the text value.(esri_label_place "Parcels" "Owner" (car (entsel)) (getpoint))
Result example usage
Creates a new text entity and links it's value to the selected feature's Owner field value, and returns an associated list containing the new text entity name:
((330 . <Entity name: 21f082035d0>))
Return values
The following are the possible return values:
- If successful, the function returns an associated list that contains entity name of the created text entity.
- 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" . "Field not found."))
The specified field is not a valid field of the specified feature layer.
- (nil ("Error" . "Feature layer not
found."))
The specified feature layer value is not a valid feature layer in the drawing.
- (nil ("Error" . "Field label already assigned."))
The label already exist for the selected feature.
- (nil ("Error" . "Missing required argument."))
One of the four required arguments was not provided.
- (nil ("Error" . "Invalid or missing drawing object."))
The entity was not selected or is invalid.