Jump to content

Delete entity in nested block


maksolino

Recommended Posts

Hello

I would like to have a lisp whith the possibility to

delete entities in nested block.

(without going inside the block)

Thanks

Link to comment
Share on other sites

Hi,

What do you mean "without going inside the block"? Can you explain a bit more... when and how would you like to select the entity?

 

How would you like to repair an engine without opening a bonnet?

Link to comment
Share on other sites

Written inside the forum post editor... may be typos...

 

(defun c:nerase ( / e )
   (if (setq e (car (nentsel)))
       (progn
           (vla-delete (vlax-ename->vla-object e))
           (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acactiveviewport)
       )
   )
   (princ)
)
(vl-load-com)

Or for multiple objects, maybe:

 

(defun c:nerase ( / e )
   (while (setq e (car (nentsel)))
       (vla-delete (vlax-ename->vla-object e))
   )
   (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acactiveviewport)
   (princ)
)
(vl-load-com)

Window selection is not possible for a nested selection.

Link to comment
Share on other sites

  • 4 years later...

Hi Lee Mac !!

 

is it possible to select one nested (e.g. Line, Arc, ...) object/entity and delete the whole objects/entity of the same Layer out of the Block/nested Block ?

 

Written inside the forum post editor... may be typos...

 

(defun c:nerase ( / e )
   (if (setq e (car (nentsel)))
       (progn
           (vla-delete (vlax-ename->vla-object e))
           (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acactiveviewport)
       )
   )
   (princ)
)
(vl-load-com)

Or for multiple objects, maybe:

 

(defun c:nerase ( / e )
   (while (setq e (car (nentsel)))
       (vla-delete (vlax-ename->vla-object e))
   )
   (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acactiveviewport)
   (princ)
)
(vl-load-com)

Window selection is not possible for a nested selection.

 

thx in advance !

Bluebird

Link to comment
Share on other sites

  • 4 years later...

How to delete entities below the block

First, I will select the block and select the area and its needs to delete all entity

Lee Mac "Autoblock Break" am currently using but same time its not getting

arc and another small blocks is not deleting

Edited by Ajmal
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...