Globally change True Color to Index Color in AutoCAD LT 2024

Globally change True Color to Index Color in AutoCAD LT 2024

jfleetwoodL88KS
Community Visitor Community Visitor
1,632 Views
5 Replies
Message 1 of 6

Globally change True Color to Index Color in AutoCAD LT 2024

jfleetwoodL88KS
Community Visitor
Community Visitor

Hello, Forum.  This is my first post.  I was given an architectural file where some layers use True Color. I am unable to plot my finished work to monochrome (a requirement of the client).  I had hoped that I could just change the color of the affected layers to an index color...which does plot in monochrome even though it displays in color. Is this even possible with AutoCAD LT 2024?  I found the following discussion in AutoCAD help: Black and white (monochrome/grayscale) color-dependent plot style (CTB) plots color in AutoCAD

The steps outlined there are way above my pay grade at this time.  I was expecting to be able to simply add my own layer to this work.  This was supposed to be "quick and easy". Maybe one of you folks can point me in a good direction.

0 Likes
1,633 Views
5 Replies
Replies (5)
Message 2 of 6

paullimapa
Mentor
Mentor

Try this lisp routine lyr2aci.lsp which will cycle through all the layers and set their colors to ACI #:

; lyr2aci converts all layer colors to aci color #s
; OP:
; https://forums.autodesk.com/t5/autocad-lt-forum/globally-change-true-color-to-index-color-in-autocad-lt-2024/m-p/13012981/thread-id/206618
(defun c:lyr2aci (/ lyr lyrname lyrcolor lyrent)
; loop through layer names
 (while (setq lyr (tblnext "LAYER" (not lyr)))
  (setq lyrname (cdr (assoc 2 lyr)) ; get layer name
        lyrcolor (cdr (assoc 62 lyr)) ; get aci color #
        lyrent (tblobjname "LAYER" lyrname) ; get layer entity
  )
  (setpropertyvalue lyrent "Color" lyrcolor) ; set layer color to aci color #
 ) ; while
 (princ"\nAll Layer Colors Converted to ACI Color Numbers.")
 (princ) 
) ; defun

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 6

pendean
Community Legend
Community Legend
Or... Ask the file creator to provide you with their "monochrome" plot style table (it is likely an STB, never a CTB if they used truecolors, CTBs ignore them).

Or... you can use an STB instead: just match their layer STYLE settings, and there is a monochrome STB file in AutoCADLT2024, you can start with that one.
0 Likes
Message 4 of 6

jfleetwoodL88KS
Community Visitor
Community Visitor
Thank you for the lisp program. This has given me a direction for further learning. To be honest, until recently my experience with AutoCAD was limited to 2D wiring diagrams. I have grabbed your program and will experiment with it in the coming days.
I appreciate the information.
Best...
JF
0 Likes
Message 5 of 6

jfleetwoodL88KS
Community Visitor
Community Visitor
Thanks very much for the response. You are of course correct. The best thing to do is obtain the file type I need in the first place. Your post has informed me about what to talk to the architect about. And I am digging further into the topic by digging further into the information you and Paul provided.
Best Regards and thanks.
JF
0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes