TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Hrishikesh on August 15, 2017, 03:35:40 AM

Title: Please Help!!! on this Lisp
Post by: Hrishikesh on August 15, 2017, 03:35:40 AM
Hello community...
I am facing problem to use "REVERT (Express Tool)" command in my Autocad.
So I wrote a lisp which works like Revert. It works good till open same drawing & close previous copy of drawing but I stuck at this point "How to activate newly opened copy?
Can you please help me on this?
Thanks in advance...
Code - Auto/Visual Lisp: [Select]
  1. (defun c:REOPEN (/ Dwgname Readonly)
  2.  (command "QSAVE")
  3.  (setq Dwgname (strcat (getvar "DWGPREFIX") (getvar "DWGNAME")))
  4.            Dwgname
  5.            (if Readonly
  6.             :vlax-true
  7.             :vlax-false
  8.            )
  9.  )
  10.  (command "close" "Y")
  11. )
  12.  
Title: Re: Please Help!!! on this Lisp
Post by: cmwade77 on August 15, 2017, 12:54:01 PM
To my knowledge this can't be done purely in LISP, you will basically need your routine to create a SCRIPT file, run it, then the SCRIPT file will need to run another LISP routine to delete the script file.

I could be wrong, but this is my understanding on how this all works.