CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products []
Cesky English Deutsch
 Visitors: 3956 

CAD tip CAD tip # 10071:

Question CAD 
 %  platform  category 
Q - question

How to recolor layers from ACI to truecolor?

A - answer How to change layer colors (ACI) to Truecolors of the same hue? E.g. to change a layer color Red (1) to the RGB color 255,0,0.

You can use the following LISP utility to recolor layers, changing their color method "palette" (ACI) to Truecolor:

; Layer ACI -> truecolor
(defun C:LAY2TC ( / lay truecol aci R G B)
 (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
   (setq truecol (vla-get-truecolor lay))
   (if (= (vla-get-ColorMethod truecol) acColorMethodByACI)
      (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)
 ); vlax

You can download the LAY2TC add-on application from

100% *  CAD 
30.10.2014    3039x  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 11054:Difference volume (3D solid) between two TIN surfaces (sets of coordinates)
Tip 10945:DWG text in dashed or dotted linetype.
Tip 10921:The tolerance frame is displayed or printed in different line weight.
Tip 10682:Automatic classification of drawing objects by their properties.
Tip 10574:Four methods for exploding blocks in AutoCAD.

Back   All CAD Tips All CAD tips&tricks

How to reserve a floating license to a specific PC? « | » Surface texture symbol with predefined texts and symbols.

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info

Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.