SteveK Posted August 10, 2009 Posted August 10, 2009 Hey, The first question (EDIT) was my mistake which ronjonp brought to light. The second question I have is alternatives to for loops. I frequently have a list of entities/objects where I want to find objects with two or more particular properties. This I can achieve with a few for loops, one for each property but it seems messy. I was trying to think of other ways and I thought of using vl-position and this will work if there's only one object I'm after: (setq obj (nth (vl-position '<something> (mapcar 'vla-get-<something> objlst)) objlst) Have you got any better ways of finding multiple objects that have multiple properties in a list of objects? Ofcourse the best alternative is the quickest. I'm assuming ssget is the quickest filter and I will use that initially. Quote
ronjonp Posted August 10, 2009 Posted August 10, 2009 Will this not work for you? (vl-sort yourpointlist (function (lambda (x1 x2) (> (car x1) (car x2))))) Quote
SteveK Posted August 10, 2009 Author Posted August 10, 2009 Hi, thanks for replying. Your right! I'm sorry my mistake, it is somewhere else in my code I am losing entities. I automatically assumed vl-sort was the culprit. If anyone can help with my other question that'd be great. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.