The esri_label_place function 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 [text_size])
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 | A 3D point where the new text label will be placed.
- text_size | double | optional | The text height of the new text label to be placed.
Example usage
Attempt to graphically select a feature of the Parcels feature layer, 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 its 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 the entity name of the created text entity.
- If failed, it returns a list with the first value of nil; then, an associated list is returned 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 exists for the selected feature.
- (nil ("Error" . "Missing required argument."))
One of the required arguments was not provided.
- (nil ("Error" . "No features found."))
The selected feature is not in the feature layer.
- (nil ("Error" . "Invalid or missing drawing object."))
The entity was not selected or is invalid.