Author Topic: Display number color of objects  (Read 3700 times)

0 Members and 1 Guest are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Display number color of objects
« Reply #15 on: August 17, 2011, 12:40:18 PM »
Or even a smaller change:
Code: [Select]
;;  CAB/Recursive version
(defun _GetColour (e / c)
  (if (setq c (cdr (assoc 62 e)))
    (cond
      (
       (cdr
         (assoc c
                '(
                  (0 . "ByBlock")
                  (1 . "Red")
                  (2 . "Yellow")
                  (3 . "Green")
                  (4 . "Cyan")
                  (5 . "Blue")
                  (6 . "Magenta")
                  (7 . "White")
                 )
         )
       )
      )
      ((itoa c))
    )
    (strcat "ByLayer -> " (_GetColour (tblsearch "LAYER" (cdr (assoc 8 e))))) ;Irné change to recursive
    ;;  CAB change
  )
)
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.