SSX is an Express Tool (in A2K at least, I don't know about earlier), for
making a selection set of things just like the thing you select at its first
prompt. I fiddled with it a little, and it takes some getting used to. If
you use it "straight," in this situation looking for all occurrences of a
block, it will find all insertions of the same block name on the SAME layer,
with the same linetype, etc. If you remove the Layer filter, it finds them
on all layers. I tried inserting some with the current linetype and color
set to something other than bylayer, thinking you'd have to remove those
filters, too, but it seems if you remove the Layer filter, it does find the
ones that are inserted with other linetypes and colors, even though you
haven't removed those filters -- go figure.
You don't need to make the selection set and then erase P. You CAN use ssx
as a command to make a selection set to do it that way, but you can also use
(ssx) [with the parentheses] in response to the erase command's object
selection prompt, so you build your selection set inside the erase command.
The \ is to pick a block, the LA is to play with the Layer filter, and the
first enter (semicolon) after it is to turn it off (instead of, for example,
feeding in another Layer name) so all insertions on all Layers will be
found. The next semicolon completes the ssx operation, and the next
completes the erase command. I've tested this, and it works (in ADT2K4, at
least):
[Erase All of a Block]^C^Cerase (ssx) \LA ;;;
If you happened to pick a Line instead of a Block, this would erase all the
Lines in the drawing, so you might want to think about controls to prevent
that kind of thing. (Maybe it should be called "Erase all of an Entity
Type" or something.) I thought of trying something like this:
[Erase All of a Block]^C^Cerase
<however-you-get-into-'filter-without-dialog-box>
<however-you-specify-Block-name-as-the-Filter>
<pick-a-block-and-extract-its-block-name>
<however-you-say-Add-that-to-the-filter-list>
<however-you-say-Apply-the-filter-list> ALL ;;
but I couldn't find a way to get into filtering without the dialog box. Any
ideas?
Kent Cooper, AIA
"ECCAD" wrote...
Post by ECCADI don't know the 'ssx' function you have, but if it is a 'command' e.g.
[Select Block, Erase All]^c^c(c:ssx);(command "_erase" "P" "");