此函数用于更改点要素选择集的元素类型。
语法
(esri_feature_changeElementType selection_set element_settings)
参数
- selection_set | AutoCAD 选择集 | 必填 | 要素的有效选择集。
- element_settings | 关联列表 | 必填 | 以点对形式表示的设置的关联列表,定义如下:
相关标注 | 值类型 | 值描述 | 必填或可选 |
---|---|---|---|
"Type" | string | POINT、Block Reference 或 AECC_COGO_POINT 的默认元素类型 | 必填 |
"Description" | string | 如果类型为 Block Reference,则为块名称;如果类型为 AECC_COGO_POINT,则为描述 | 必填:如果块参照或 AECC_COGO_POINT |
示例用法
使用名为 Damaged_Structure 的 AutoCAD 块插入更改所选集的元素设置。
(esri_feature_changeElementType
(setq ss (ssget))
(list (cons "Type" "Block Reference") (cons "Description" "Damaged_Structure"))
)
结果示例用法
更改所选要素的元素类型并返回 true 列表:
(T)
返回值
- 如果成功,则返回 true 列表:(T)
- 如果失败,则该函数将返回一个列表,其中第一个值为 nil,然后将返回一个包含键值 Error 的关联列表以及字符串形式的关联错误消息:(nil ( "Error" . "<message>"))。
失败的返回值
出于以下任一原因,可能出现失败的返回值:
- (nil ("Error" . "Missing required argument."))
未提供三个必填参数之一。
- (nil ("Error" . "Incorrect argument."))
提供给函数的参数无效。
- (nil ("Error" . "Block name does not exist."))
工程图中不存在 Description 中的指定块名称。