
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing aid function for some other coding and found I need to see the chain of entities and their properties one at a time. [Single picks using only (car(entsel)). Not using ssget.]
Easy enough iterating forward with (entnext e). But sometimes I need to step back up the list in the same way.
I combed manuals and forums but didn't find a solution. Couldn't even find a question like this.
So I wrote the following...
(defun entprior (e / i e-all)
(setq e-all (ssget "x")
index 0 )
(while (/= (cdr (assoc -1 (entget(ssname e-all i))))
(cdr (assoc -1 (entget e))))
(setq i (+ i 1)) ); while
(setq e (ssname e-all (- i 1))) );func
I feel like I just reinvented the stick.
Is there a simpler or more obvious function out there or maybe a vlx I missed?
Regards,
B.
Solved! Go to Solution.