Jump to content

Delete all points/nodes in drawing (also in blocks)


DesmetMartin

Recommended Posts

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

Link to comment
Share on other sites

(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 by pBe
  • Like 1
Link to comment
Share on other sites

Hi pBe.

 

You may have omitted one of these functions. IF, OR, AND before checking if the block definition is not an External Reference. ;)

 

:shock: You are right. Good catch Tharwat.

Link to comment
Share on other sites

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