[php];; 批量属性块修改 xls→dwg (defun c:tt () (CMDLA0) (setq lst (xyp-Xls2List) ss (ssget '((0 . "INSERT") (8 . "控制点"))) i -1 ) (while (setq s1 (ssname ss (setq i (1+ i)))) (if (xyp-get-Attibutes s1) (progn (setq lst1 (xyp-get-LispValue (vla-GetAttributes (XYP-E2O s1)))) (setq a (vla-get-TextString (car lst1))) (foreach b lst (if (member a b) (setq c b) ) ) (if c (progn (setq t1 (nth 1 c) t2 (nth 2 c) t3 (nth 3 c) ) (vla-put-TextString (cadr lst1) t1) (vla-put-TextString (caddr lst1) t2) (vla-put-TextString (cadddr lst1) t3) (setq c nil) ) ) ) ) ) (CMDLA1) )[/php] |