rlx Posted March 18, 2018 Share Posted March 18, 2018 (defun PurgeMe () (if (= (length (vl-remove-if '(lambda(x)(or (< x 48)(> x 57))) (vl-string->list (vl-filename-base (getvar 'DWGNAME))))) 7) (progn ; purge everything (vla-purgeall (vla-get-activedocument (vlax-get-acad-object))) ; maybe do a zoom extents (vla-ZoomExtents (vlax-get-acad-object)) ; save drawing (command ".qsave") ) ) (princ) ) ;; Auto-run on start up of drawing names that their names are consist of digits only. (PurgeMe) Quote Link to comment Share on other sites More sharing options...
acad1985 Posted March 18, 2018 Author Share Posted March 18, 2018 Excellent Rlx. You saved me. Thank you so much for your code.. this is working as what i want. Thank you so much all of you for your effort on this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.