Jump to content

Recommended Posts

Posted

Hi to all,

is there any lisp which can delete layouts tab from multiple dwg in one go?

Posted

You can write a script that would do that simplest way. Look at scriptpro.

Posted (edited)

(post deleted) - misread OP
 

Edited by dan20047
Posted

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.

Posted
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 ?

Posted
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 🙂

  • Like 1
Posted
2 hours ago, Lee Mac said:

 

No particular reason, I just fancied a change 🙂

Understood 🍻

Posted
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

Posted
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.

Posted

"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.

 

 

Posted

In my opinion, the author does not read all the messages, only the last one 🙄
I previously gave lisp and solution for all files 😀

  • Like 1
Posted
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.

Posted
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 😧

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...