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: 10794
Plex.Earth connects AutoCAD and Google Earth

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    25307×  
Prices - CAD eShop:
applies to: ACADweb ·

See also:
Tip 14063:How to get week day and week number from a given date.
Tip 14006:Universal MsgBox in AutoLISP.
Tip 13933:How to set grid colors in AutoCAD Web?
Tip 13920:Saving your Inventor model in the presentation color scheme (iLogic).
Tip 13884:How to send e-mails with an iLogic macro?


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:
Export 3D VRML scenes from AutoCAD and Inventor
VRMLout 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