Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys, may I have some help please?
I swear I tried to learn MAPCAR but it is too much to my limited brain...
So, why this is not working?
(defun c:Highlight ( / typ color i e) (setq typ (ssget)) ;Highlight the objects with custom color (repeat (setq i (sslength typ)) (setq e (ssname typ (setq i (1- i)))) (setq color (cons (vla-get-color (vlax-ename->vla-object e)) color));Save the colors in a list (vla-put-color (vlax-ename->vla-object e) 3) (redraw e 3) );repeat (alert "Selected objects in green"); Actually, here I will put my routine ;Unhighlight the objects with the original color (repeat (setq i (sslength typ)) (setq e (ssname typ (setq i (1- i)))) (mapcar '(vla-put-color (vlax-ename->vla-object e)) color);Re-assign the original colors to each object (redraw e 4) );repeat )
Thanks,
Marcelo
Solved! Go to Solution.