meja
发表于 2020-11-8 09:29:50
longer1000 发表于 2020-7-13 09:36
兄弟,共享一下吧
希望帮到你(defun c:find-att (/ ov ss i en ed an ad ah)
(while (not ov)
(setq ov (getstring t "\nATTRIB Value To Search For: ")))
(and (setq ss (ssget "X" (list (cons 0 "INSERT")
(cons 66 1)
(if (getvar "CTAB")
(cons 410 (getvar "CTAB"))
(cons 67 (- 1 (getvar "TILEMODE")))))))
(setq i (sslength ss))
(while (not (minusp (setq i (1- i))))
(setq en (ssname ss i)
ed (entget en)
an (entnext en))
(while (/= "SEQEND" (cdr (assoc 0 (entget an))))
(setq ad (entget an)
ah (cdr (assoc 40 ad))
an (entnext an))
(if (= (strcase ov)
(strcase (cdr (assoc 1 ad))))
(progn
(command "_.ZOOM" "_C" (cdr (assoc 10 ed)) (* ah 33));缩放比例
;(redraw en 3)
(getstring "\nPress Enter To Continue Searching..."))))))
;(redraw)
(prin1))