DOING ENTITY COUNT

DOING ENTITY COUNT

Anonymous
Not applicable
1,403 Views
8 Replies
Message 1 of 9

DOING ENTITY COUNT

Anonymous
Not applicable

Good morning all.

We have a lisp, written a long time ago, which does a total area (SQ-UNITS) of the selected entities.

I've found that at a certain point, the property window will no longer do a count of the selected entities. 

how could I write a lisp that would count all entities, which would not run out?

It appears that the properties window will only count 25,000. I did a manual work around, and found that I had 32,000 entities in this particular drawing. This is quite common for the work we do here.

 

TYIA

 

0 Likes
Accepted solutions (4)
1,404 Views
8 Replies
Replies (8)
Message 2 of 9

doglips
Advocate
Advocate
Accepted solution

Try: (Setq AllEntities (ssget "X"))

       (setq EntityCount (sslength AllEntities))

Message 3 of 9

Kent1Cooper
Consultant
Consultant
Accepted solution

Does it need to be via the Properties box?  If you just want to know how many there are, object selection within any editing command -- List, Move, Copy, Erase, etc. -- reports on the quantity, and doesn't seem to be limited in the way you describe.  [Or if it is, it's a much higher limit -- I just tried without close to 60,000 items.]

 

In AutoLisp terms, (sslength (ssget)) will do it.

Kent Cooper, AIA
Message 4 of 9

Anonymous
Not applicable

 

No.

No properties box is required. A basic message box would suffice. 

 

Thank you. 

0 Likes
Message 5 of 9

doglips
Advocate
Advocate
Accepted solution

(Setq AllEntities (ssget "X"))

       (setq EntityCount (sslength AllEntities))

       (alert (strcat "There Are " (rtos EntityCount) " Entities"))

 

Message 6 of 9

Anonymous
Not applicable

This is perfect.

It gave the answer in the F2 window, and that suffices.

In this case, the total drawing was over 67000 items, and it was without having to select anything. So.

Thank you.....

0 Likes
Message 7 of 9

hmsilva
Mentor
Mentor
Accepted solution

@Anonymous wrote:

...

 the properties window will only count 25,000. I did a manual work around, and found that I had 32,000 entities in this particular drawing...

 


PROPOBJLIMIT (System Variable) if set to zero, turns off the limitation...

 

Hope this helps,
Henrique

EESignature

Message 8 of 9

Anonymous
Not applicable

@hmsilva wrote:

@Anonymous wrote:

...

 the properties window will only count 25,000. I did a manual work around, and found that I had 32,000 entities in this particular drawing...

 


PROPOBJLIMIT (System Variable) if set to zero, turns off the limitation...

 

Hope this helps,
Henrique


oh wow.....

better still.

Yes, it does help..... a lot!!!!!

0 Likes
Message 9 of 9

hmsilva
Mentor
Mentor

@Anonymous wrote:

@hmsilva wrote:

@Anonymous wrote:

...

 the properties window will only count 25,000. I did a manual work around, and found that I had 32,000 entities in this particular drawing...

 


PROPOBJLIMIT (System Variable) if set to zero, turns off the limitation...

 

Hope this helps,
Henrique


oh wow.....

better still.

Yes, it does help..... a lot!!!!!


You're welcome, stevedeb!
Glad I could help

Henrique

EESignature