Skip To Content

esri_featurelayer_getDefaultElementType (AutoLISP)

此函数将返回元素设置的关联列表:

  • 类型值是在 ArcGIS for AutoCAD 中创建新要素时使用的 AutoCAD 或 Civil 3D 实体类型。有效值为 POINTBlock ReferenceAECC_COGO_POINT
  • 当元素类型为 Block Reference 时,描述值为 AutoCAD 块插入名称。
  • 当元素类型为 AECC_COGO_POINT 时,描述值为点描述前缀值。

语法

(esri_featurelayer_getDefaultElementType flname subtype)

参数

  • flname | 字符串 | 必填 | 工程图中的现有点要素图层名称。
  • subtype | 字符串 | 可选 | 工程图中的现有点要素图层子类型名称。

示例用法

请求名为 Damage_to_Residential_Buildings 且没有任何子类型的要素图层的元素设置。

(esri_featurelayer_getDefaultElementType "Damage_to_Residential_Buildings")

结果示例用法

将以关联列表形式返回元素设置,其中 TYPE 值为要素图层符号的实体类型,DESCRIPTION 值为块名称:

(("TYPE"."Block Reference")("DESCRIPTION"."Damaged_Structure"))

返回值

  • 如果成功,则将返回一个关联列表,其中 Type 值为 POINTBlock ReferenceCOGO_POINT 实体类型,DESCRIPTION 值为块插入名称或 COGO 点描述前缀。
  • 如果失败,则该函数将返回一个列表,其中第一个值为 nil,然后将返回一个包含键值 Error 的关联列表以及字符串形式的关联错误消息:(nil ( "Error" . "<message>"))

失败的返回值

出于以下任一原因,可能出现失败的返回值:

  • (nil ("Error" . "Missing required argument."))

    未提供三个必填参数之一。

  • (nil ("Error" . "Unsupported geometry type."))

    该函数仅适用于点要素图层。

  • (nil ("Error" . "No feature layer specified"))

    未提供任何有效的要素图层。

  • (nil ("Error" . "Feature layer not found."))

    文件中不存在指定的要素图层。

  • (nil ("Error" . "Subtype name does not exist."))

    指定的子类型不存在。