PDA

View Full Version : QSelect Blocks



avminkler
2010-08-05, 04:27 PM
Hello all, here's what I'm trying to do....

I would like to select all the same block in a particular drawing. I know this can be accomplished by using the 'QSelect' command, then selecting 'Block Reference', and then selecting 'Name'. What I would love to do is make an Icon to streamline this process that automatically invokes this command line and would then allow me to select a single block as reference to then automatically highlight any other block reference of the same name. Is it possible to do this or is there another way that I am unaware of?

Andy.88917
2010-08-05, 06:23 PM
Have you tried just right clicking on a block and then "select similar"?

Works for me and I use it often.

avminkler
2010-08-06, 03:13 PM
I've run into a problem with that since the block is Dynamic. Any EXACT reference of that block will select using the select similar command but if any dynamic feature is used it won't recognize that block. I need to go through the qselect command sequence I listed above in order for it to select the block by its name. Is there a way to change what takes precident with select similar when selecting a block? Has the select similar funtion worked for you with dynamic blocks? Maybe I'm missing something?

Tharwat
2010-08-06, 04:26 PM
The following is a code of Autolisp, insert it in the command line and it will select all your blocks that are having the same name.

Note: Insert the name of the block instead of the red words below :



(sssetfirst nil (ssget "_x" '((0 . "INSERT")(2 . "YourBlockName"))))

Best Regards,

Tharwat

RobertB
2010-08-06, 04:43 PM
The following is a code of Autolisp, insert it in the command line and it will select all your blocks that are having the same name.

Note: Insert the name of the block instead of the red words below :



(sssetfirst nil (ssget "_x" '((0 . "INSERT")(2 . "YourBlockName"))))

Best Regards,

TharwatThat won't work with dynamic blocks. Dynamic blocks with non-default properties will be an anonymous block.

You would need somthing similar to this (http://forums.augi.com/showpost.php?p=1066922&postcount=12).

Tharwat
2010-08-06, 04:57 PM
That won't work with dynamic blocks. Dynamic blocks with non-default properties will be an anonymous block.

You would need somthing similar to this (http://forums.augi.com/showpost.php?p=1066922&postcount=12).

I have just tried it with Dynamic Blocks and it has selected all blocks which have the same name ! ! ! !...

I do wonder, why it does not work with Dunamic Blocks as you have mentioned before . !

Best Regards,

Tharwat

RobertB
2010-08-06, 05:44 PM
I have just tried it with Dynamic Blocks and it has selected all blocks which have the same name ! ! ! !...

I do wonder, why it does not work with Dunamic Blocks as you have mentioned before . !Insert two intances of the same dynamic block. Change one of the instances dynamic properties.

Use the following code to select the altered dynamic block. Note the block name (DXF code 2). It is an anonymous block. The effective block name is available, but only by digging into the data.

(entget (car (entsel)))

Tharwat
2010-08-06, 06:00 PM
Insert two intances of the same dynamic block. Change one of the instances dynamic properties.

Use the following code to select the altered dynamic block. Note the block name (DXF code 2). It is an anonymous block. The effective block name is available, but only by digging into the data.

(entget (car (entsel)))

YES. You're right.

I have modified it according to your suggestion and I got unknown after minimum to parameters and actions.

So the name of the dynamic block will disappear and become unknown , as The following:


((-1 . <Entity name: 7ee04858>) (0 . "INSERT") (5 . "1F3") (102
. "{ACAD_XDICTIONARY") (360 . <Entity name: 7ee04c48>) (102 . "}") (330 .
<Entity name: 7ee02cf8>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"ACDUCT") (100 . "AcDbBlockReference") (2 . "*U9") (10 -72.944 21.5325 0.0) (41
. 1.0) (42 . 1.0) (43 . 1.0) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0)
(210 0.0 0.0 1.0))


Best Regards,

Tharwat

irneb
2010-08-12, 06:32 AM
Or you could use my SelectSimilar lisp routine which works for older acads as well. It's got an option for filtering by EffectiveName which works for DB's.

http://forums.augi.com/showthread.php?t=66329