The esri_featurelayer_getDefaultElementType function returns an associated list of element settings as follows:
- The type value is the AutoCAD or Civil 3D entity type used when new features are created in ArcGIS for AutoCAD. The valid values are POINT, Block Reference, and COGO Point for points and multipoint. For polygon hatches, the type values are Hatch and Automatic. Automatic omits any hatch fill symbol for polygons
- The description value is the AutoCAD block insert name when the element type is Block Reference.
- The description value is the point description prefix value when the element type is COGO Point.
- The description value is the hatch pattern name for polygons.
Syntax
(esri_featurelayer_getDefaultElementType flname subtype)
Arguments
- flname | string | required | An existing feature layer name in the drawing.
- subtype | string | optional | An existing feature layer subtype name in the drawing.
Example usage
This example requests the element setting of a feature layer named Damage_to_Residential_Buildings with no subtype. (esri_featurelayer_getDefaultElementType "Damage_to_Residential_Buildings")
Result example usage
This example returns the element setting as an associated list in which the TYPE value is the entity type of the feature layer symbol and the DESCRIPTION value is the block name:
(("TYPE"."Block Reference")("DESCRIPTION"."Damaged_Structure"))Return values
The following are the possible return values:
- If successful, an associated list is returned in which the Type value is the POINT, Block Reference, or COGO Point entity type, or the Hatch or Automatic value for polygons, and the DESCRIPTION value is the block insert name, COGO point description prefix, or polygon hatch pattern name.
- 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 returned 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, multipoint, and polygon layers.
- (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.