pmadhwal7 Posted May 11, 2021 Share Posted May 11, 2021 Hi to all, is there any lisp which can delete layouts tab from multiple dwg in one go? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 11, 2021 Share Posted May 11, 2021 You can write a script that would do that simplest way. Look at scriptpro. Quote Link to comment Share on other sites More sharing options...
maratovich Posted May 11, 2021 Share Posted May 11, 2021 9 hours ago, pmadhwal7 said: Hi to all, is there any lisp which can delete layouts tab from multiple dwg in one go? Use this to process multiple drawings - AutoRunLisp DeleteAllLayout.lsp Quote Link to comment Share on other sites More sharing options...
SLW210 Posted May 11, 2021 Share Posted May 11, 2021 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Please post in the correct forum. Quote Link to comment Share on other sites More sharing options...
dan20047 Posted May 11, 2021 Share Posted May 11, 2021 (edited) (post deleted) - misread OP Edited May 11, 2021 by dan20047 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 11, 2021 Share Posted May 11, 2021 You can define a basic program such as: (defun c:deltab ( ) (vlax-map-collection (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))) '(lambda ( x ) (if (= :vlax-false (vla-get-modeltype x)) (vla-delete x))) ) (princ) ) (vl-load-com) (princ) And then run the above across multiple drawings using an AutoCAD Script to open each drawing, load & run the AutoLISP program, and then save & close the drawing. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted May 11, 2021 Share Posted May 11, 2021 1 hour ago, Lee Mac said: You can define a basic program such as: (defun c:deltab ( ) (vlax-map-collection (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))) '(lambda ( x ) (if (= :vlax-false (vla-get-modeltype x)) (vla-delete x))) ) (princ) ) (vl-load-com) (princ) And then run the above across multiple drawings using an AutoCAD Script to open each drawing, load & run the AutoLISP program, and then save & close the drawing. Hey Lee .. why did you choose vlax-map-collection over vlax-for ? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 11, 2021 Share Posted May 11, 2021 44 minutes ago, ronjonp said: Hey Lee .. why did you choose vlax-map-collection over vlax-for ? No particular reason, I just fancied a change 1 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted May 12, 2021 Share Posted May 12, 2021 2 hours ago, Lee Mac said: No particular reason, I just fancied a change Understood Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted May 12, 2021 Author Share Posted May 12, 2021 12 hours ago, Lee Mac said: You can define a basic program such as: (defun c:deltab ( ) (vlax-map-collection (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))) '(lambda ( x ) (if (= :vlax-false (vla-get-modeltype x)) (vla-delete x))) ) (princ) ) (vl-load-com) (princ) And then run the above across multiple drawings using an AutoCAD Script to open each drawing, load & run the AutoLISP program, and then save & close the drawing. is there any way to delete those tab without opening dwg or run this script to multiple dwg in one go Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 12, 2021 Share Posted May 12, 2021 39 minutes ago, pmadhwal7 said: is there any way to delete those tab without opening dwg or run this script to multiple dwg in one go Yes - as noted in my post, you can create a script to open each drawing, load & run the AutoLISP program, and then save & close the drawing. Such a script could be created using my Script Writer application, or another batch-processing tool. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 13, 2021 Share Posted May 13, 2021 "or another batch-processing tool." Its a little more complicated but way faster Google Accoreconsole, Lee has provided the lisp, which must be loaded via a script. Just need to check for VL support. Quote Link to comment Share on other sites More sharing options...
maratovich Posted May 13, 2021 Share Posted May 13, 2021 In my opinion, the author does not read all the messages, only the last one I previously gave lisp and solution for all files 1 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 15, 2021 Share Posted May 15, 2021 On 5/13/2021 at 3:17 PM, maratovich said: In my opinion, the author does not read all the messages, only the last one I previously gave lisp and solution for all files I agree - your AutoRunLisp application looks to be impressive & powerful @maratovich, congrats. Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted May 16, 2021 Author Share Posted May 16, 2021 On 5/13/2021 at 7:47 PM, maratovich said: In my opinion, the author does not read all the messages, only the last one I previously gave lisp and solution for all files i was try all the solution provided,and due to heavy work load i am unable to reply 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.