Bobzy20 Posted July 28, 2017 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
Roy_043 Posted August 19, 2017 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
BIGAL Posted August 20, 2017 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
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.