@pankaj wrote:
Hello komondormrex,
.... the same requirement lisp but with lines with different angles. ....
If they all aimed at the same center so that they could be ordered by their varying angles, or if they were positioned in drawn order, I could imagine some approaches. But they don't -- many are parallel, and the drawn order is random.
Are you willing to be required to select them using Fence mode only? Then the order in the selection would be the order in which the Fence crosses them, and it wouldn't be difficult to do what you need. EDIT:
(defun C:SEO (/ n ss); = Select Every Other
(setq
sseo (ssadd); initially empty
n -1
); setq
(prompt "\nUsing Fence selection only,")
(if (setq ss (ssget)); add entity type or Layer or... filter(s) as desired
(while (< (setq n (+ n 2)) (sslength ss))
(ssadd (ssname ss n) sseo)
); while
); if
(sssetfirst nil sseo); select/grip/highlight
)
That leaves them in the sseo variable to do with what you will, if just using the Properties palette with them as selected isn't what you need. It could be made to do something else directly with each rather than put them into another selection set.
As written, it picks the second, fourth, etc., but could be made to pick the first, third, etc., by changing the initial n variable to -2. Or it could ask whether you want the odds or the evens. It could even be made to ask for the interval -- select every third one? every seventh one?
Or, do they always have Multileader numbered identifiers pointing to them as in your drawing [i.e. those are not just for illustration]?
Kent Cooper, AIA