open drawing and continue the command in lisp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
my lisp here:
(defun c:open11()
;; open dwg files
(vl-load-com)
(setq cnt 0)
(setq alls '(
"44207.dwg"
)
)
(setq n (length alls))
(repeat n
(setq file (nth cnt alls))
(setq openfile (strcat "e:\\testing\\" file))
(vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) openfile))
(command "model")
(setq EMIN (getvar "EXTMIN") )
(setq EMAX (getvar "EXTMAX") )
(setq MINPT (list (car EMIN) (cadr EMIN) ) )
(setq MAXPT (list (car EMAX) (cadr EMAX) ) )
(command "rectangle" minpt maxpt)
(setq dname (getvar "dwgname") )
(setq dpath (getvar "dwgprefix") )
(setq newfile (strcat dpath (substr dname 1 (- (strlen file) 4 ) ) "_blk.dwg") )
(command "close")
(setq cnt (1+ cnt))
)
)
when opened the dwg, then the lisp stopped. How to continue running the follows lisp command?