CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE

CAD tip CAD tip # 8543:

Question

CAD 
 %  platform  category 
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
100% *CAD
29.3.2012   11596×  
   
this tip shared by ARKANCE experts applies to: AutoCAD ·

See also:
Tip 14957:Controlling Navisworks from the runstring.
Tip 14946:Dimensioning the arc length and radius at the same time.
Tip 14908:New feature - company policy for updating Autodesk software.
Tip 14861:RegExpCnt - LISP string replace function with arithmetic/counter-extension
Tip 14753:Overview of startup parameters for acad.exe and acadlt.exe (runstring)


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
  





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