Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QUICKSELECT functionality in a script or action

2 REPLIES 2
Reply
Message 1 of 3
yardstickciv
750 Views, 2 Replies

QUICKSELECT functionality in a script or action

not sure where this question should go, but does anyone know if it's possible to create an action with specific parameters set for the functions available in the QUICKSELECT command?

 

my example.

 

i would like to create an action that selects all block references whose name equals newblock and ... do whatever action - scale, delete, etc.

 

any help would be ... helpful.

 

thanks!

2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: yardstickciv


@yardstickciv wrote:

not sure where this question should go, but does anyone know if it's possible to create an action with specific parameters set for the functions available in the QUICKSELECT command?

.... 

i would like to create an action that selects all block references whose name equals newblock and ... do whatever action - scale, delete, etc.

....


It should go in the Customization forum, here.  Look into the (ssget) AutoLISP function, in which you can filter for entity type, and things like Block name, and all manner of other things similar to what QSELECT filters for, and it can find all entities matching the filter criteria within a User's selection, or in the entire drawing.  Search the Customization forum for

 

(ssget "_X"

 

[with and/or without the underscore, and not case-sensitive] and you'll find more examples than you'll know what to do with of finding all matching entities in the entire drawing.  Search for

 

(ssget "_X" '((0 . "INSERT")

 

for examples of finding all Blocks & Xrefs.  You won't find anything if you Search for this specifically, but the format for finding all Blocks of a certain name would be something like this:

  

(ssget "_X" (list '(0 . "INSERT") (cons 2 "YourBlockName") ...

 

[That can include other filter criteria such as Layer, etc., so the ingredients and order can vary.]

 

Most such examples will then go on to do something with the things they have found, which you can study to learn how to do whatever you are looking to do.

Kent Cooper, AIA
Message 3 of 3
yardstickciv
in reply to: Kent1Cooper

thanks kent - much appreciated.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost