Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

How can we ban yellow color on autocad for good?

How can we ban yellow color on autocad for good?

behzatyaras
Participant Participant
3,693 Views
27 Replies
Message 1 of 28

How can we ban yellow color on autocad for good?

behzatyaras
Participant
Participant

Hi All,

 

As a furniture manufacturer, we are collaborating with a project company on a project. In all the files sent by the project company, the most critical points are always drawn in yellow. It’s not feasible for us to manually open each file and change the yellow-colored objects or layers to another color, as the total number of files is in the thousands. Is there a way to ensure that whenever we open a file, yellow appears as black in the model or layout views? I've tried many methods but haven’t succeeded. If it were up to me, I would ban yellow from AutoCAD entirely! 😄 Does anyone have a solution?

0 Likes
Accepted solutions (2)
3,694 Views
27 Replies
Replies (27)
Message 2 of 28

CGBenner
Community Manager
Community Manager

@behzatyaras 

Welcome to the Community. I've moved your post to this forum for better visibility. This MAY be possible with some programming, the gurus in here may have a better answer.  Good luck!

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!



Chris Benner

Community Manager - NAMER / D&M


Message 3 of 28

Kent1Cooper
Consultant
Consultant

You could simply change your background color to black [I run that way all the time, partly for the specific reason that yellow is so hard to see against a white background].  You would need to do it only once -- it's not something that's saved separately in each drawing file.  There could be other colors that would then be harder to see [blue color 5 is somewhat, though not as hard as yellow on white], but that depends on what other colors they use.

EDIT:  The other reason for using a black background is that so many other colors in the darker range of things, while perfectly visible on a white background, are nearly impossible to distinguish from each other, but much easier to on a black background.

Kent Cooper, AIA
Message 4 of 28

DGCSCAD
Advisor
Advisor

This is possible with LISP, and here's an outline of how:

 

  • Create a function that selects/changes all objects bycolor "Yellow" and all layers with color "Yellow" to "Black".
  • Set up an acaddoc.lsp so it loads and runs the above function when each drawing is opened.
  • The acaddoc.lsp file must reside in a support/trusted path.

 

You could add a switch to turn it on and off as well.

..or just have a function ready to call if needed.

 

Yes, I agree yellow lines/text on a white paper background es no bueno, but banning a color? lol I have a similar situation with this outlier of a hue, but still need the color to be shown, so I went with more of a mustard tint.

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 5 of 28

pendean
Community Legend
Community Legend

@behzatyaras wrote:

...we are collaborating with a project company on a project. In all the files sent by the project company...


Why not just ask the other company to "not do that"?

Message 6 of 28

tramber
Advisor
Advisor

Our pc3 (s) are all set to turn the yellow to another color, considering the problem is for printed things... 

If not, a vast vlax-for yellow kille ... for entities and layers would be a solution.


EESignature

Message 7 of 28

Kent1Cooper
Consultant
Consultant

@DGCSCAD wrote:

....

  • Create a function that selects/changes all objects bycolor "Yellow" and all layers with color "Yellow" to "Black". ....

Ideally, that should also include finding objects nested in Blocks, and also parts in Dimension and Multiline Style definitions that have yellow color assigned.  Neither category would be affected by just changing the color of Layers and selectable objects.  And then there's internal Mtext formatting, and maybe some other possibilities....

Kent Cooper, AIA
Message 8 of 28

DGCSCAD
Advisor
Advisor

Yes sir. Down the rabbit hole.

 

Explode and Unformat "all". Ban anything associated with #2. lol

 

 

AutoCad 2018 (full)
Win 11 Pro
Message 9 of 28

scot-65
Advisor
Advisor

@behzatyaras 

With the help from other members in this forum, the following routine

will toggle both the model space and paper space backgrounds between

black and white.

 

"Toggle Background Color"

 

;;  Toggle Model Space / Paper Space Background Color  ;8-27-2020
;;   Switches from a black background to a white background.
(defun c:TBGC (/ prefDisplay c)
 (vl-load-com)
 (setq prefDisplay (vla-get-Display (vla-get-Preferences (vlax-get-acad-object)))
       c (vlax-variant-value (vlax-variant-change-type (vla-get-GraphicsWinModelBackgrndColor prefDisplay) vlax-vbLong))
 )
 (vla-put-GraphicsWinModelBackgrndColor prefDisplay (vlax-make-variant (if (= c 0) 16777215 0) vlax-vbLong))
 (vla-put-GraphicsWinLayoutBackgrndColor prefDisplay (vlax-make-variant (if (= c 0) 16777215 0) vlax-vbLong))
 (princ)
)

 

I employ this almost on a daily basis as part of my job description is to "redline" PDF underlays.

 

The icon I use for the CUI command is:

scot65_0-1734037441246.png

 

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 10 of 28

Sea-Haven
Mentor
Mentor

I agree with others just set the background color, if black is a bit harsh try using a grey background. We had our default CTB as 1st seven colors as black so yellow would plot black. I could not work with white background. Hint OPTIONS DISPLAY. Set once. 

Message 11 of 28

behzatyaras
Participant
Participant

Thank you for your reply. I tried that but still hard to work on it, especially with long working hours.

0 Likes
Message 12 of 28

behzatyaras
Participant
Participant

Thank you for your reply. I tried to use lisp file with the help of chatgpt but still no use..
Here is what i used, maybe somebody else will use it.

(defun c:grayscale ()
(setq allObjects (ssget "X")) ; Tüm nesneleri seç
(if allObjects
(progn
(repeat (sslength allObjects)
(setq obj (vlax-ename->vla-object (ssname allObjects 0)))
(vla-put-TrueColor obj 8421504) ; Gri (RGB 128,128,128)
)
(princ "\nTüm nesneler grayscale olarak ayarlandı.")
)
(princ "\nÇizimde nesne bulunamadı.")
)
(princ)
)

0 Likes
Message 13 of 28

behzatyaras
Participant
Participant

Smart move. However, we have already thousands of dwg files.
Thank you for your reply.

0 Likes
Message 14 of 28

behzatyaras
Participant
Participant

Thank you for your reply but i do not understand what you mean.

0 Likes
Message 15 of 28

behzatyaras
Participant
Participant

Thank you for your reply but thousands of dwg files, hundreds of layers... hard to manage.. I think we need permanent and swift solution.

0 Likes
Message 16 of 28

behzatyaras
Participant
Participant

😄 thank you for your reply.

0 Likes
Message 17 of 28

behzatyaras
Participant
Participant

Thank you for your reply. Changing background color is not the solution i am looking for. It is still hard to work on it.

0 Likes
Message 18 of 28

behzatyaras
Participant
Participant

Thank you for your reply. Plotting is another issue. A grayscale print out is okay for us but working on a project like this so hard and exhausting.

0 Likes
Message 19 of 28

ВeekeeCZ
Consultant
Consultant

You might need to buy a better monitor. Or calibrate the colors on the current one, or adjust contrast and brightness.

 

On the ACAD side, if you have trouble with vision, you can try adjusting the line weight setting to have bolder lines.

 

eekeeCZ_1-1734108327127.png

 

 

Message 20 of 28

behzatyaras
Participant
Participant
Accepted solution

I found a solution and it is a little interesting. I have searched web like pretending a color blind person. 
As i found, windows has a lot of accessibility features. You can easily change your color filters under windows accessibility section. When you activated it, default shortcut is "ctrl+windows+c" I choose "protanopy" mode for best result.
I hope it will be helpful for other people suffer from "yellow" color.
You can check the attachment below for result.autodesk forum.jpg