Message 1 of 6

Not applicable
03-22-2015
10:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
Could some one tell me how to ISOLATE a group of objects through a list of their index (idxgroup variable in the following code)?
By the way, welcome all advices to improve this code.
Thank you.
My code:
(defun c:test(/ idxgroup) (setq obj1 (ssget)) (command "_.area" "_o" (ssname obj1 0)) ; area of 1st object (setq area (getvar "area")) ; pick objects to compare their area values to the 1st one (setq obj2 (ssget)) (setq i (sslength obj2)) ; loop (repeat i (setq idx (1- i)) (command "_.area" "_o" (ssname obj2 idx)) ; area of the current object (setq area2 (getvar "area")) (if (= area2 area) (progn (setq prop (entget (ssname obj2 idx))) ; change color object (setq ed (subst (cons 62 1) (assoc 62 prop) prop)) (entmod ed) ; object's index group that have equal area (setq idxgroup (append idxgroup (list idx))) ) ; progn ) ; if (setq i (1- i)) ) ; repeat (command "isolateobjects" <<need helps>> ) ; defun
Solved! Go to Solution.