The function sets the default element type of a point feature layer and if successful, returns those settings.
Syntax
(esri_featurelayer_setDefaultElementType flname subtype element_settings)
Arguments
- flname | string | required | An existing point feature layer name in the drawing.
- subtype | string | required | An existing point feature layer subtype name in the drawing. Enter "" for an empty string if no subtype is provided.
- element_settings | associated list | required | An associated list of settings as dotted pairs defined as follows:
Associated label | Value type | Value description | Required or optional |
---|---|---|---|
TYPE | String | The default element type of POINT, Block Reference, or AECC_COGO_POINT | Required |
DESCRIPTION | String | The block name if the type is Block Reference, or a description if the type is AECC_COGO_POINT | Required |
Example usage
Set the default element settings of a feature layer named Damage_to_Residential_Buildings with no subtype to be an AutoCAD block reference named Damaged_Structure. (esri_featurelayer_setDefaultElementType
"Damage_to_Residential_Buildings"
""
(list (cons "TYPE" "Block Reference") (cons "DESCRIPTION" "Damaged_Structure"))
)
Result example usage
Set the default element type of the feature layer and return the element_settings as an associated list:
(("TYPE"."Block Reference")("DESCRIPTION"."Damaged_Structure"))
Return values
This function returns a value.
- If successful, an associated list is returned in which the TYPE value is the POINT, Block Reference, or AECC_COGO_POINT entity type, and the DESCRIPTION value is the block reference name, or COGO point description prefix.
- If failed, a list is returned 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
A failed return value can occur for any of the following reasons:
- (nil ("Error" . "Missing required
argument."))
One of the three required arguments was not provided.
- (nil ("Error" . "Unsupported geometry type."))
The function works with point feature layers only.
- (nil ("Error" . "No feature layer specified"))
No valid feature layer was provided.
- (nil ("Error" . "Feature layer not found."))
The specified feature layer does not exist in the file.
- (nil ("Error" . "Subtype name does not exist."))
The specified subtype does not exist.