Lt Dan's legs Posted January 3, 2011 Posted January 3, 2011 Is there a system variable for this? Quote
Tiger Posted January 3, 2011 Posted January 3, 2011 not a variable but under Options > Display tab > Colors > Commandline. Why do you need/want to change the color? Quote
Lt Dan's legs Posted January 3, 2011 Author Posted January 3, 2011 Lee came up with a dragging text with grread. I was thinking about using it in a routine and matching the text color with the command line text. Quote
Jack_O'neill Posted January 3, 2011 Posted January 3, 2011 In 2010, its in the "tools" menu, then all the way to the bottom for "options", then the display tab, and hit the "colors" button about midway down in that dialog box. See below. Tiger, I made my command line background black, then changed the text color to yellow. I draw on a black background too. Easier on my eyes than the standard white background. Quote
Lt Dan's legs Posted January 3, 2011 Author Posted January 3, 2011 (edited) I know where it's located in options. I was just going to entmake text with the color example of what lisp I'm talking about https://sites.google.com/site/reidbooe/lisp go to example.avi Edited January 3, 2011 by Lt Dan's legs Quote
Lee Mac Posted January 3, 2011 Posted January 3, 2011 Something like this should do it: ;; Sets the Command Line Text Color ;; Args: r,g,b Red,Green,Blue values. (defun PutCommandLineTextColor ( r g b ) ;; © Lee Mac 2011 (vla-put-TextWinTextColor (vla-get-Display (vla-get-Preferences (vlax-get-acad-object)) ) (+ (fix r) (lsh (fix g) (lsh (fix b) 16)) ) ) Quote
Lee Mac Posted January 3, 2011 Posted January 3, 2011 I know where it's located in options. I was just going to entmake text with the color Apologies' date=' it sounds like you want to retrieve the colour, not change it (as my code demonstrates) - In which case my code is pretty useless. I don't think the OLE_COLOR Variant returned by [i']vla-get-TextWinTextColor[/i] is compatible with the Visual LISP variant functions, so it might be better to get the value straight from the registry and convert it to an RGB colour. (getenv "TextWindow.ForeColor") Note that the 24-bit True Color integer used by AutoCAD is not a true RGB value, but rather 'BGR' as the Red value occupies the third (high) byte. Hence one must convert the OLE_COLOR value to a True Color value before using it with entmake. I'm in the middle of updating my site with such functions so check back soon perhaps. Quote
Lt Dan's legs Posted January 3, 2011 Author Posted January 3, 2011 not a problem. I didn't really look at the code when I posted that response . For now I'll stick to what I have Thanks for all the help guys Quote
Lee Mac Posted January 3, 2011 Posted January 3, 2011 See here for the conversion functions: http://lee-mac.com/colourconversion.html Using the above, you could create your text as follows: (entmakex (list (cons 0 "TEXT") (list 10 0 0 0) (cons 40 1.0) (cons 1 "Lee Mac") (cons 420 (LM:OLE->True (atoi (getenv "TextWindow.ForeColor")) ) ) ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.