- ;; stsc(实体删除)
- (defun c:stsc (/ ilst ll1 ll2 lst-e)
- (cmdla0)
- (defun main-pro (/ lst et ss)
- (setq lst (xyp-Get-Str2Lst li1)
- lst (mapcar '(lambda (x) (nth (atoi x) lst-e)) lst)
- et (xyp-strcat lst ",")
- )
- (if (= k1 "1")
- (progn
- (princ "\n选择删除范围: ")
- (setq ss (ssget (list (cons 0 et))))
- )
- (setq ss (ssget "X" (list (cons 0 et))))
- )
- (if ss
- (progn
- (alert
- (strcat "\n删除类型 "
- et
- " 的实体共 "
- (itoa (sslength ss))
- " 个"
- )
- )
- (xyp-erase ss)
- )
- )
- )
- (defun ak01 (/ s1 et)
- (if (setq s1 (car (entsel "\n实体类型<退出>: ")))
- (setq et (xyp-dxf 0 s1)
- li1 (vl-position et lst-e)
- )
- )
- (sub)
- )
- (defun sub ()
- (setq ll1 '(li1 k1 k2)
- ll2 '("0" "1" "0")
- )
- (defun ajbcs () (xyp-Multiple-Settile ll1 ll2))
- (xyp-initSet ll1 ll2)
- (setq lst-e (xyp-List "obj")
- ilst '(("li1" "实体类型" "list" "lst-e" "8" "10")
- ("" "" ":boxed_row{")
- ("txyp" "图选实体类型>>" "textpart" "6")
- ("k01" "图选" "i6" "-15" "3" "xyp1964(shizixian01)" "(ak01)")
- "}"
- ("" "方式" ":boxed_radio_row{")
- ("k1" "框选" "radio")
- ("k2" "全图" "radio")
- "}"
- "spacer;"
- ("jbcs" "缺省参数" "button1" "(ajbcs)")
- "spacer;"
- )
- )
- (if (= (xyp-Dcl-Init Ilst "【实体删除】V2013.3.23" t) 1)
- (main-pro)
- )
- )
- (sub)
- (cmdla1)
- )
|