CAD FORUM - TIPS & TRICKS | UTILITIES | DISCUSSION | BLOCKS | SUPPORT | HELP & ASSISTANCE
Over 1.126.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
The new Beam calculator, Spirograph generator and Regression curves in the Converters section.
New AutoCAD 2027 commands and sys.variables
CAD tip # 8543:
Question
A
If you need to change the background color of your AutoCAD commandline - e.g. to indicate a certain status of your application - you can use the following simple LISP macro. You can call it directly from menus, from scripts or from your own applications.
This macro uses the ActiveX interface in VisualLISP, so you need to invoke (vl-load-com) at least once (or prepend this call to the macro).
Switch to red background:
(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))255)
Back to white background:
(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))16777215)
Similarly you can change the text color of your commandline with TextWinTextColor. The color numbers are Windows (OLE) color codes.
ACAD
29.3.2012
11596×
this tip shared by ARKANCE experts applies to: AutoCAD ·
![CAD Forum - ARKANCE Community - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]](../common/arkance_186.png)

What is the ARKANCE Community?