Selection set processing backwards

Selection set processing backwards

wundrlik
Advocate Advocate
264 Views
2 Replies
Message 1 of 3

Selection set processing backwards

wundrlik
Advocate
Advocate

Ok, I'm having a brain cramp today.  I have a piece of code, that after selecting my objects allows me to process each one.  I want to order to be first to last picked, and it's processing last to first picked order

 

(repeat (setq cnt (sslength ss))
(setq itm (ssname ss (setq cnt (1- i)))
ent (entget itm)
)

 

I know the problem is in this area, and it has to do with setting cnt to the sslength ss, and then subtracting until it reaches zero.  I'm having a brain cramp reworking this piece so that the processing starts at first picked and goes up to the last picked.

 

Any assistance would be appreciated

Ryan A Wunderlich
0 Likes
265 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant

There are many ways how to do that... read this on Lee Mac's page.

Message 3 of 3

wundrlik
Advocate
Advocate

Thanks, I knew where it was and got my brain back on track from your link.  Kudos to you

Ryan A Wunderlich
0 Likes