Select a Block at desired location

Select a Block at desired location

karthand
Explorer Explorer
613 Views
2 Replies
Message 1 of 3

Select a Block at desired location

karthand
Explorer
Explorer

I would like to know if there any way to select a block at a desired co ordinate, purge and delete the objects at an enclosed area.

 

I have already modified few lisps and was able to figure out the second part, but need help with selecting the block at the given co ordinates.

 

(defun C:DTTX (/ ss1)
(ssget "C" '((0 . "insert") (10 401 14 0)))
(c:burst)
(if (setq ss1 (ssget "_W" '(395 18) '(410 10) '((0 . "TEXT"))))
(command "_.erase" ss1 "")
(alert "TEXT Not Found")
);; End of if
(princ)
)

0 Likes
614 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant

So you have given an insertion point of some block... 

0 Likes
Message 3 of 3

Kent1Cooper
Consultant
Consultant

@karthand wrote:

....

(ssget "C" '((0 . "insert") (10 401 14 0)))
....


That (ssget) function requires two points between the "C" and the filter list, to define the crossing window.

 

If you know there will be a Block with its insertion point at that location, change the "C" to an "X".

Kent Cooper, AIA
0 Likes