Hi,everyone. I'm from taiwan. I'm masao.
Excuse me how to modify the LISP,make it like "pedit" function?
*This function can't use list.(photo 2)
(defun expt()
(command "_explode" (entlast))
)
(defun c:tz()
(setvar "osmode" 0 )
(terpri)
;size
(initget "A0 A1 A2 A3 A0V A1V A2V A3V")
(setq size (getint "paper size:[A0/A1/A2/A3/A0V/A1V/A2V/A3V]<A3>:"))
(if (= size nil) (setq size "A3")) ;if not
(setq size (strcase size))
(setq ii "A3h.dwg")
;if
(cond ((= size "A3V") (setq ii "A3v.dwg"))
((= size "A2") (setq ii "A2h.dwg"))
((= size "A2V") (setq ii "A2v.dwg"))
((= size "A1") (setq ii "A1h.dwg"))
((= size "A1V") (setq ii "A1v.dwg"))
((= size "A0") (setq ii "A0h.dwg"))
((= size "A0V") (setq ii "A0v.dwg"))
)
(command "_insert" ii pause 1 1 "")
(expt)
)
(princ)
(princ "\n:: loadpaper.lsp- command\"tz\" ::")
(princ "\n:: \"A0~A3\" - horizontal paper ::")
(princ "\n:: \"A0V~A3V\" - vertical paper ::")
(princ)