路过的高手,帮帮忙啊!这个程序谁能帮忙加个尺寸类型的选择啊,
;;;修改属性值 (defun c:SZ (/ e1) (setvar "cmdecho" 0)(setvar "pickbox" 21) (setq e1 (entget (car (setq s1 (entsel "选择编辑对象:"))))) (if (= (cdr (assoc 0 e1)) "TEXT") (command "DDEDIT" s1))
(if (= (cdr (assoc 0 e1)) "MTEXT") (command "DDEDIT" s1)) (if (= (cdr (assoc 0 e1)) "INSERT") (command "DDATTE" s1))(princ))
就是说如果我选择的类型是“尺寸”哦: '((0 . "DIMENSION")) , 那么我就执行以下这些代码:
(defun TDZ (/ nqz nhz QZ HZ ) (SETQ DS (getstring (strcat "\n 输入替代值:" ))) (if (= DS nil ) (command "dim1" "new" (strcat DS "<>{}{}") e1 "")) (if (/= DS nil ) (command "dim1" "new" (strcat DS "{}{}") e1 "")) (princ))
|