DesmetMartin Posted February 23, 2018 Posted February 23, 2018 Hi, I'm searching for a lips or command/method to delete ALL points from a drawing (.dwg). This is needed because our company gets a lot of drawings from other companys where in there drawing are a lot of points/nodes. We need this to be deleted in a few cllicks instead of opening the blocks and delete them. We currently have Acad 2016 and will switch to 2018 in a few months. Thank you in advance! Kind regards, Martin Quote
pBe Posted February 23, 2018 Posted February 23, 2018 (edited) (defun c:blitzH (/ adoc) (vlax-for blk (vla-get-blocks (setq adoc (vla-get-ActiveDocument (vlax-get-acad-object)) ) ) [color="blue"] (if [/color](eq :vlax-false (vla-get-isXref blk)) (vlax-for h blk (if (and (vlax-write-enabled-p h) (eq (vla-get-ObjectName h) "AcDbPoint") ) (vla-delete h) ) ) [b][color="blue"] )[/color][/b] ) (vla-regen aDoc acAllViewports) ) But of course, there are other factors to consider like locked layer and some Edited February 23, 2018 by pBe 1 Quote
ronjonp Posted February 23, 2018 Posted February 23, 2018 Or if you just don't want to see them: (setvar 'pdmode 1) Quote
pBe Posted February 23, 2018 Posted February 23, 2018 Or if you just don't want to see them: (setvar 'pdmode 1) Yes, that too. Quote
Tharwat Posted February 23, 2018 Posted February 23, 2018 Hi pBe. You may have omitted one of these functions. IF, OR, AND before checking if the block definition is not an External Reference. Quote
pBe Posted February 23, 2018 Posted February 23, 2018 Hi pBe. You may have omitted one of these functions. IF, OR, AND before checking if the block definition is not an External Reference. You are right. Good catch Tharwat. Quote
BIGAL Posted February 23, 2018 Posted February 23, 2018 My $0.05 in my autoload (defun c:PTY () (setvar 'pdmode 35) ; turn on ptype (setvar 'pdsize 0.2) ) (defun c:PTYY () ; turn off ptype (setvar 'pdmode 1) ) 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.