| 我很困惑。。请调查一下。 这是我正在使用的实际代码,未能在适当的位置插入您的代码。请帮我个忙。
 
 
 (defun c:Bathy (/ tpath fd info Soundings Bs Bsc BSL data ipt ba tpt x y xs ys) (defun *error* (msg)(if msg (princ (strcat "\nError! " msg)))(princ)) ;//pBe (defun _roundTruncated  (a)     (setq b (fix a)           c (* (abs (- a b)) 10))    (if (= c 0)      (setq d 0)           (setq d (fix (+ c (/ c (abs c) 2.0)))))) ;// ;//pBe (defun _HiLow  (lev lev2 lst)     (list           (apply lev (mapcar 'car lst))           (apply lev2 (mapcar 'cadr lst))           )) ;//  (setq tpath (getfiled "Select XYZ File" "*.*" "" 4))   (setvar "cmdecho" 0)   (setvar "osmode" 0)   (graphscr)   (setq fd   (open tpath "r")  info (read-line fd)   )   (if        (/= info nil)     (progn(if (setq Soundings (getfiled "Select Sounding Block" "*.*" "dwg" 4))  (progn(setq Bs (Getreal "\nScale factor for Bathymetry Block <1>:"))(if (= Bs Nil)  (setq Bsc 1)  (setq Bsc Bs)))(exit))     )     (progn (alert "Bathy file is empty") (exit))   )   (setq Bsl (rtos Bsc 2 3))   (while (/= info nil)     (setq data (read (strcat "(" (vl-string-translate "," " " info) ")"))           ipt (list (car data)(cadr data))           bat (atof (rtos (caddr data) 2 4))    tpt data)     (if (< bat 0)(progn     (setq ba (* -1 bat)    x (fix ba)           y (_roundTruncated bat))     (if (= y 10)(progn  (setq x (+ x 1)        y 0))(progn  (setq x x        y y)))                 (setq xs (strcat "%%U" (itoa x))    ys (itoa y))     (command "insert" Soundings ipt Bsl Bsl 0 xs ys)     (setq info (read-line fd)))       (progn     (setq x  (fix bat)           y (_roundTruncated bat))     (if (= y 10)(progn  (setq x (+ x 1)        y 0))(progn  (setq x x        y y)))         (setq xs        (itoa x)    ys        (itoa y))           (command "insert" Soundings ipt Bsl Bsl 0 xs ys)     (setq info (read-line fd))   )))   (close fd)   (command "zoom" "e")   (command "regen")   (setvar "osmode" 31743)   (*error* nil)   (princ) )
 
我应该在哪一行插入您给定的缩放窗口代码,我正在尝试,但失败了。 |