Entity name list

Entity name list

carlos_m_gil_p
Advocate Advocate
5,597 Views
22 Replies
Message 1 of 23

Entity name list

carlos_m_gil_p
Advocate
Advocate

Hello how are you.

Someone will have a recursive function to extract the name of all the entities that are in a drawing.

I need to get a list in this way, to place it in a dcl.

("ARC" "CIRCLE" "LINE" "POLYGONMESH")

I selected everything that is in the drawing, then I extract the name of each entity and if it works for me.

But the problem is that if I have many entities, the function gives an error.

And the only way to solve it is with a recursive function.

Or if there is another way to get that list from the database directly. That would be good.

Thank you very much.

And excuse me my English, I only speak Spanish.


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

0 Likes
Accepted solutions (1)
5,598 Views
22 Replies
Replies (22)
Message 21 of 23

carlos_m_gil_p
Advocate
Advocate

@john.uhden 

 

Hello how are you.
Some of the entities that do not appear are: Polar array, center mark, etc.

 

@pbejse

 

Hi.
I currently use QSELECT but I have to be selecting entity by entity.
And it is very slow and more if there are many types of entities to select.
As I put it, I can select several entities at the same time.

 

Thank you.


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

0 Likes
Message 22 of 23

john.uhden
Mentor
Mentor

I may be totally off base, but I think a polar array (actually any array) is not one AutoCAD entity but numerous entities resulting from the use of some ARRAY command.  I am also guessing that a "center mark" is not a native AutoCAD entity but probably a reference of a block definition.

 

If you want each block insertion listed separately by name, then a little more has to be added to @pbejse's function.

 

What's included in the etc. ?

John F. Uhden

0 Likes
Message 23 of 23

carlos_m_gil_p
Advocate
Advocate
For the moment, with the help they have given me, it is enough.
I am going by comparison of each entity and I including the list and so to solve it.
Thank you very much.

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

0 Likes