匹配属性数据
我正在寻找一种方法,从一个街区匹配到另一个街区。我看过李的matchattribs,但我想要更残酷的东西。这两个块具有相同的属性,我正在寻找一种方法,将所有属性从一个块匹配到另一个块。有人有这样的东西吗? 此项按标记名复制
(defun c:attcopy (/ ss en an ad ts i tag al)
(while (or (not ss)
(/= (sslength ss) 1))
(princ "\nSelect Original INSERT")
(setq ss (ssget '((0 . "INSERT")(66 . 1)))))
(setq en (ssname ss 0)
an (entnext en)
ad (entget an))
(while (= "ATTRIB" (cdr (assoc 0 ad)))
(setq al (cons (cons (cdr (assoc 2 ad)) (cdr (assoc 1 ad))) al)
an (entnext an)
ad (entget an)))
(princ "\nSelect Target INSERTs")
(and (setq i -1
ts (ssget '((0 . "INSERT")(66 . 1))))
(while (setq en (ssname ts (setq i (1+ i))))
(setq an (entnext en)
ad (entget an))
(while (= "ATTRIB" (cdr (assoc 0 ad)))
(setq tag (cdr (assoc 2 ad)))
(if (assoc tag al)
(entmod (subst (cons 1 (cdr (assoc tag al)))
(assoc 1 ad) ad)))
(setq an (entnext an)
ad (entget an)))
(entupd en)))
(prin1))
-大卫 好东西,大卫。这正是我想要的。 不客气-大卫 http://www.cadtutor.net/forum/showthread.php?48397-复制所有属性&p=329507&viewfull=1#post329507
https://www.cadtutor.net/forum/attachment.php?attachmentid=20234&d=1274812730 我正在寻找这个确切的东西,但有能力复制它之间的不同布局
你知道我该怎么做吗? 干得好,艾伦。
页:
[1]