Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can we ban yellow color on autocad for good?

27 REPLIES 27
SOLVED
Reply
Message 1 of 28
behzatyaras
782 Views, 27 Replies

How can we ban yellow color on autocad for good?

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! :grinning_face_with_smiling_eyes: Does anyone have a solution?

27 REPLIES 27
Message 2 of 28
CGBenner
in reply to: behzatyaras

@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!


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
Message 3 of 28
Kent1Cooper
in reply to: behzatyaras

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
in reply to: behzatyaras

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
Message 5 of 28
pendean
in reply to: behzatyaras


@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
in reply to: behzatyaras

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.

Message 7 of 28
Kent1Cooper
in reply to: DGCSCAD


@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
in reply to: Kent1Cooper

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
in reply to: behzatyaras

@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
in reply to: behzatyaras

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
in reply to: Kent1Cooper

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

Message 12 of 28
behzatyaras
in reply to: DGCSCAD

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)
)

Message 13 of 28
behzatyaras
in reply to: pendean

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

Message 14 of 28
behzatyaras
in reply to: tramber

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

Message 15 of 28
behzatyaras
in reply to: Kent1Cooper

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

Message 16 of 28
behzatyaras
in reply to: DGCSCAD

:grinning_face_with_smiling_eyes: thank you for your reply.

Message 17 of 28
behzatyaras
in reply to: scot-65

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

Message 18 of 28
behzatyaras
in reply to: Sea-Haven

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.

Message 19 of 28
ВeekeeCZ
in reply to: behzatyaras

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
in reply to: behzatyaras

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report