(defun c:ww() (vl-load-com) (setq kk (getfiled "Select File" (strcat(vla-get-path (vla-get-activedocument (vlax-get-acad-object)))) "dwg" 16)) (sopen kk) ) (defun openRO (fna) (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) fna :VLAX-TRUE)) ) (defun sopen (fna / n) (if (= 0 (getvar "SDI")) (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) fna)) (progn (if (not (equal 2 (logand 2 (getvar "qaflags")))) (setvar "qaflags" (+ (getvar "qaflags") 2)) ) (if (not (equal 4 (logand 4 (getvar "qaflags")))) (setvar "qaflags" (+ (getvar "qaflags") 4)) ) (command "_.open") (if (not (equal 0 (getvar "dbmod"))) (command "_y") ) (command fna) (setq n 0) (while (and (< n 4) (wcmatch (getvar "cmdnames") "*OPEN*") ) (T (command "") ) (setq n (+ n 1)) ) (setvar "qaflags" 0) ) ) )
|