这是个插入图框程序,在CAD2004插入图框完全没问题,而用在CAD2007的时候,那个插入点就不对了,图框离框选的位置好远,请高手看看是什么问题,可以帮忙改一下吗? (defun c:TK();;;;;;;;;;;;;;;;;;;;;;;;;;自动插图框,在CAD支持路径要有a0.dwg这个文件 (if (not (tblsearch "layer" "FRAME")) (command "layer" "n" "FRAME" "c" "7" "FRAME" "") ) (setq mylayer (getvar "clayer")) (setq layname1 (substr mylayer 1 2)) (setq layname2 (strcat layname1 "FRAME")) (if(setq ed1 (tblsearch "LAYER" layname2)) (progn (setq ed2 (cdr (assoc 70 ed1))) (cond ((= ed2 0) (command "layer" "on" layname2 "")) ((= ed2 1) (command "layer" "t" layname2 "on" layname2 "")) ((= ed2 4) (command "layer" "u" layname2 "on" layname2 "")) ((= ed2 5) (progn (command "layer" "t" str3 "u" layname2 "on" layname2 ""))) ) ) (setq layname2 "FRAME") ) (command "layer" "s" layname2 "") (setq pt1 (getpoint "左下角点:\n")) (setq pt2 (getcorner pt1 "右上角点::\n")) (setq disx (distance pt1 pt2)) (setq acx (/ disx 491.00)) (setq os (getvar "osmode")) (setvar "osmode" 0) (command "insert" "a0.dwg" pt1 "x" acx "" acx "" ) (setvar "osmode" os) (princ) ) |