AutoLisp to improve time efficiency QuickSelect not doing it... =)

AutoLisp to improve time efficiency QuickSelect not doing it... =)

vporrash141089
Advocate Advocate
794 Views
3 Replies
Message 1 of 4

AutoLisp to improve time efficiency QuickSelect not doing it... =)

vporrash141089
Advocate
Advocate

Hello guys,

 

I am working on a .dwg that was converted from PDF, I need to select a large amount of elements but sadly thay are all in layer 0. However I have noticed I may be able to take advantage of the elements properties...

 

For example columns and other elements have a specific line weight, area, length, line type, color and I can manage to solve this with several Quick-selects but I believe there could be a Lisp that can help me filter specifically what I want...

 

I have tried the filter command and I honestly couldn't figure it out.

 

So I guess my question is can this be achieved with a LISP Routine?

 

Thanks in advance...

Victor.

0 Likes
795 Views
3 Replies
Replies (3)
Message 2 of 4

carlos_m_gil_p
Advocate
Advocate

 

Hello how are you.

 

Try using the QSELECT command

 

 

Regards


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 3 of 4

pendean
Community Legend
Community Legend
Side note: I have yet to experience a PDF Import where elements where the exact identical area or length in the years I've used both the AutoCAD feature or 3rd party converters, are you sure there are many of these that are 100% identical? Adjust your default rounding to 1/256 and confirm.


For all the other common settings, use SELECTSIMILAR command but adjust SELECSIMILARMODE variable settings first so it includes all the parameters you need for the task.


0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@vporrash141089 wrote:

... I may be able to take advantage of the elements properties...

 

For example columns and other elements have a specific line weight, area, length, line type, color ....


 

You can filter for some of those things in (ssget) selection in AutoLisp, but not all of them.  It can find things by properties that are contained in entries in entity data lists, which would include lineweight, linetype, and color, but not  area or length [those are not stored, but are only results  of stored properties such as endpoints or vertices].  In the example of columns, if they're represented by Circles, they could be isolated by radius.

 

As an example, to find all Lines that have red assigned as a color override:

(ssget "_X" '((0 . "LINE") (62 . 1)))

 

For things like area or length, you would need to have it find all of an object type [e.g. Polylines], and then step through the resulting set and check the area or length of each, putting those that qualify into another selection set, or onto a different Layer, or giving them a particular color, or whatever else you want to do with them.

Kent Cooper, AIA