Bobzy20 Posted July 28, 2017 Share Posted July 28, 2017 Hi Does anybody know of a script for AutoCAD 2012 that will remove all 3DSolids within a drawing even if they are nested within a block/s? Any help would be great Thanks Bob Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted August 19, 2017 Share Posted August 19, 2017 This can't be done with a script (*.scr). But a Lisp solution is possible: (defun c:Test ( / doc) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vla-endundomark doc) (vla-startundomark doc) (vlax-for blk (vla-get-blocks doc) (vlax-for obj blk (if (= "AcDb3dSolid" (vla-get-objectname obj)) (vla-delete obj) ) ) ) (vla-endundomark doc) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 20, 2017 Share Posted August 20, 2017 Add this before the (princ) to remove other solids (setq ss (ssget "X" (list (cons 0 "3dSolid")))) (command "erase" ss "") Quote Link to comment Share on other sites More sharing options...
Bobzy20 Posted August 22, 2017 Author Share Posted August 22, 2017 Thank you both for your help. 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.