[I]just an info form net[/I]
Dave, I got this code from here, some time ago, it works great. You need to preload the LISP befor use the button. Here is my toolbar button:
C^C(AE_NEWDWG "C:/HOME/ACAD2000/Mytemplate.d-wt" T); ------------- for MDI only and the code: ------------- (defun AE_NEWDWG ( template status / ae-acad-object newdwg ) (vl-load-com) (setq ae-acad-object (vlax-get-acad-object)) (if (not template) (setq newdwg (vla-add (vla-get-documents ae-acad-object))) (setq newdwg (vla-add (vla-get-documents ae-acad-object) template)) ) (if (not status) (princ "\nNew drawing created\n") (vla-put-activedocument ae-acad-object newdwg) ) (princ) ) ------------------ Cheers, Louis
|