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: 10729

CAD tip CAD tip # 8543:

   
Question CAD 
 %  platform  category 
Q - question

Setting command line background color from LISP.

A - answer 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    9267×  
Prices - CAD eShop:
applies to: AutoCAD ·

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:
Publish interactive 3D PDF models from AutoCAD, Inventor or Revit with Share3D 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