Jump to content

Delete all Wipeouts within a Drawing including Blocks


Recommended Posts

Posted
Hey Tharwat,

 

One last thing to 'perfect' this code would be if it could return 0 if there are none removed. Not sure if that is an easy thing to add in or not..

At the moment when you try to use it and there are no wipeouts, it doesn't say anything so sometimes not sure if its actually run properly or not.

 

Codes updated to include this message report.

  • 3 years later...
  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    12

  • masterfal

    10

  • kpblc

    8

  • Bluebird1973

    5

Top Posters In This Topic

Posted Images

Posted
On 11/21/2015 at 12:10 PM, Stefan BMR said:

Another method

 


(defun C:DELWP ( / *error*) (vl-load-com)
 ;;;(setq *error* (err))
 (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
   (if
     (not (eq (vla-get-isxref block) :vlax-true))
     (vlax-for obj block
       (if
         (eq (vla-get-objectname obj) "AcDbWipeout")
         (vla-delete obj)
         )
       )
     )
   )
 ;;;(*error* nil)
 (princ)
 )
Just to let you know this short routine you made, was a big, big present to me! You saved at least two hours of stupid work.
Thanks a lot!!

 

 

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