Tharwat Posted August 16, 2016 Posted August 16, 2016 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. Quote
cadsite Posted March 15, 2020 Posted March 15, 2020 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!! Quote
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.