本帖最后由 CAD智能@未来 于 2024-10-31 11:32 编辑
- ;获取选择集的图元列表
- (setq ents (mapcar
- 'cadr
- (vl-remove-if
- '(lambda (x)
- (< (car x) 0))
- (ssnamex ss)
- )
- )
- )
- ;获取选择集端点集
- (setq pts (apply
- 'append
- (mapcar
- '(lambda (x)
- (mapcar
- 'cdr
- (vl-remove-if-not
- '(lambda (y)
- (= 10 (car y))
- )
- (entget x)
- )
- )
- )
- ents
- )
- )
- )
- ;获取选择集表文字内容
- (setq str_lst(mapcar
- '(lambda(x)
- (cdr
- (assoc 1 (entget x))
- )
- )
- ents
- )
- )
- ;删除图元列表
- (mapcar '(lambda (x) (entdel x)) ents)
|