- ;用多边形PL线范围窗选图元(kxty).lsp
- (defun c:kxty (/ aa en info pt_lst ss)
- (setq en (car (entsel "\n选择一个多边形:")))
- (setq info(entget en))
- (setq pt_lst (mapcar 'cdr
- (vl-remove-if-not '(lambda (x) (= (car x) 10) ) info )
- )
- )
- (setq pt_lst pt_lst)
- (setq ss(ssget "cp" pt_lst ))
- (sssetfirst ss ss)
- (setq aa (sslength ss))
- (setq aa (- aa 1))
- (princ (strcat "\n多边形范围内功选择图元对象:" (rtos aa 2 2) "个"))
- (princ)
- )
万能的大佬们,能不能帮我优化下,总感觉有点问题~
|