CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products []
Cesky English Deutsch
 Visitors: 3273 

CAD tip CAD tip # 3088:

Question CAD 
 %  platform  category 
Q - question

How to set the drawing window background color from menu, script or LISP?

A - answer Use the Background AutoCAD environment variable (not system variable) to change model window background color - e.g.:
(SETENV "Background" "1111111")
or (in LT):
_SETENV Background 1111111
and restart your drawing window (e.g. by switching to a layout and back).

Similarly you can change the layout (paperspace) background color with:

(setenv "Layout background" "123456")

Do not forget to specify the color code as a string and type the variable name verbatim as specified above (upper/lowercase).

The color code is calculated as:

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

You can get the current code by:

(getenv "Background")

100% *  CAD 
9.6.2003    6785x  
Comments   Tell a friend

Back   All CAD Tips All CAD tips&tricks

Intellimouse zoom in MapGuide maps. « | » How to change the drawing order of objects by their color?

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   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.