; Layer ACI -> truecolor
(defun C:LAY2TC ( / lay truecol aci R G B lm i)
 (vl-load-com)
 (setq lm (getstring "\nLayer(s) to convert to truecolor (*=all, layer name or mask) <*>: ")  i 0)
 (if (= lm "") (setq lm "*"))
 (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
   (if (wcmatch (vla-get-name lay) lm)(progn
   (setq truecol (vla-get-truecolor lay))
   (if (= (vla-get-ColorMethod truecol) acColorMethodByACI) ; ACI?
    (progn
      (setq aci (vla-get-ColorIndex truecol))            
      (vla-put-ColorMethod truecol acColorMethodByRGB)
      (vla-put-ColorIndex truecol aci)
      (setq R (vla-get-red truecol))
      (setq G (vla-get-green truecol))
      (setq B (vla-get-blue truecol))
      (vla-setRGB truecol R G B)
      (vla-put-truecolor lay truecol)
      (setq i (1+ i))
    )
   )
   ))
 ) ; vlax
 (princ (strcat "\n" (itoa i) " layer(s) converted."))
 (princ)
)
