CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 3979

CAD tip CAD tip # 13468:

   
Question CAD 
 %  platform  category 
Q - question

How to change the drawing background color in AutoCAD Web? (black drawing)

A - answer Even in the AutoCAD Web version you can set the color of UI elements. For this, use the respective environment variables.

For example, the Background variable is used to set the background color of the model space. The Layout background variable is used to set the background color of the paper (layout).

You set the color hue using a numeric string. Its value can be calculated using the formula:

(blue * 65536) + (green * 256) + red

You can use the LISP function (setenv) to set this. Type this function (including parameters) to the AutoCAD Web command line. The names of variables must be specified exactly, including upper/lower case letters. The numeric color code is a string, i.e. in double-quotes.

An example of setting the background color of the model (green):

(setenv "Background" "1111111")

An example of setting the background color of a layout (black):

(setenv "Layout background" "0")

The color change happens instantly, no need to restart the AutoCAD session. The color settings are remembered, even between drawings/sessions. To return to the default settings, use the default color hues for the model: "3156001" and for the layout: "16777215".



You can also automate the background-color toggle by using the freeware BW.LSP utility for AutoCAD Web. Download it from Download and using the LISP function load it for autoloading in your AutoCAD Web. This one-time operation will add a new command "BW" to your AutoCAD. Then anytime type the BW command on the AutoCAD command line to toggle both your model- and layout-background color - see:

ACADweb
100% *  CAD 
9.9.2022    711×  
Prices - CAD eShop:
applies to: ACADweb ·

See also:
Tip 13459:DWG drawing version history directly in AutoCAD.
Tip 12326:How to customize your Fusion 360 background color? (any color theme)
Tip 11502:How to detect DWG files created as an export from Autodesk Revit?
Tip 11389:Readability of annotations, white halo on AutoCAD texts.
Tip 10842:HidePStyle - completely hide selected plot style for printing.


Back   All CAD Tips



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   



Featuring:
Add .CIT raster format support to AutoCAD and Map and Civil 3D
CITin More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist