Author Topic: OnLastFileClose...  (Read 1677 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
OnLastFileClose...
« on: October 24, 2006, 02:57:32 PM »
Hi all,

I'm trying to make something like this...

(On_closeDrawing_file)
   (Progn
      (if (check if this is the last open drawing)
            (Make_Qnew_and get the Templatefile)
      )
    )
)

For the moment...i have this....but not working great.. :|

Code: [Select]
(setq acadObject (vlax-get-acad-object))
(setq documents (vla-get-Documents acadObject))
(setq count (vla-get-Count documents))
(if (= count 1)
  (progn
  (command "_close" pause)
  (command "_fileopen" (getenv "LastTemplate"))
  )
)
(princ)
     

I think there is no way in LISP...... :oops:
« Last Edit: October 26, 2006, 04:19:06 PM by Andrea »
Keep smile...