View Full Version : how do you select a block by name?
designerstuart
7th Feb 2012, 02:33 pm
i want to do smething like:
select
[enter block name]
erase
is there a way to do this? i'll use it as part of a script. any way to delete all instances of a block without having to click it would be great.
thanks!
designerstuart
7th Feb 2012, 02:36 pm
a bit more info:
i've tried using qselect, but can't run it from the command line. i've tried SELECT and ERASE commands, but neither seem to have the ability to chose objects by name? closest i've come is by using the 'previous' bit of a command, but not close enough. thx!
Tiger
7th Feb 2012, 02:51 pm
Perhaps this (http://www.cadtutor.net/forum/showthread.php?48860-Qselect&highlight=qselect+commandline) thread?
designerstuart
7th Feb 2012, 03:01 pm
Thanks Tiger
"QSELECT does not have command line option" - oh dear, as i suspected.
i was hoping to avoid lisp - mainly because i was hoping it could be done from the command line.
is there really no way to select or delete a block by name without lisping?
Tiger
7th Feb 2012, 03:04 pm
I ain't the brightest star when it comes to scripting, but I know that you can use the SSGT function right on the comandline - shouldn't that mean it's possible to put it into a script?
designerstuart
7th Feb 2012, 04:06 pm
hmmm i'm afraid i don't know enough about that either.......
failing that, anyone know a way to insert the block definition into a drawing, but not the block itself? above i was trying to insert a block, then delete it in a script, but if i can not insert it in the first place that would work.
thanks!
rkent
7th Feb 2012, 04:57 pm
You go through the insert process and cancel when asked for insertion point. The definition is in the drawing but not showing.
dbroada
7th Feb 2012, 05:17 pm
as I can never remember how to escape from scripts I do it this way....
INSERT
myBLOCK
0,0
<etc>
ZOOM
E
ERASE
L
ZOOM
P
you may not need the zoom commands provided you drop the block within the visible area of your drawing.
eyde
7th Feb 2012, 05:38 pm
Have you tried selectsimilar? under Settings just select name.
designerstuart
7th Feb 2012, 05:52 pm
as I can never remember how to escape from scripts I do it this way....
.......
you may not need the zoom commands provided you drop the block within the visible area of your drawing.
great dave, thanks for this. yes i have never used the cancel midway script command, but oddly enough did know that you can never remember how to do it!
RKent - if you know how to do this, i'd appreciate it. might make a tidier script. otherwise, the script is basically as you show dave. so is the "L" for "last"? did not know that one. i tried using "previous", but as i'd just inserted it, that didn't work.
thanks all!
ScribbleJ
7th Feb 2012, 05:55 pm
Have you tried the command SSX? Once you invoke the command press enter once more for more options. It is all command line. It is what I use in script files for selection.
designerstuart
7th Feb 2012, 06:01 pm
i've updated my script and it work perfectly, so thanks all for the help.
and now i am interested....... how do you use this "ssx"? for instance, to select a block by name?
ScribbleJ
7th Feb 2012, 07:02 pm
i've updated my script and it work perfectly, so thanks all for the help.
and now i am interested....... how do you use this "ssx"? for instance, to select a block by name?
Enter SSX at the command line the press the enter key once more to see the options. You can then enter B to choose Block name from the options it gives you.
designerstuart
8th Feb 2012, 04:16 pm
ah sweet, thanks scribble. so i could alternatively add
ssx
block
[my block name here]
erase
previous
to my script and it will erase the block by selecting it. think i will have to look into that command, it looks pretty useful.
thanks again!
ScribbleJ
8th Feb 2012, 04:48 pm
Your very welcome. One other thing you might add to that would be the purge command. I use it if I'm replacing a block with an updated version that has the same block name or deleting the engineers stamp for the record drawings. That way engineers stamps are not in the electronic files shipped off to the client. Especially if there is electronic signatures.
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.