Error in Background Color Routine
The attached routine by another is used to either to conveniently change background colors: It allows the user to either toggle (BGT) between white/black or to switch to one of three selections: white (BGWHITE), grey (BGGREY), or black (BGBLACK). The error is encountered when black is either toggled or selected.
Being a novice, I do not know how to make the needed changes and would appreciate some guidance.
The following error appears at the command line (when the background desired is to be black):
Error: Automation Error E_FAIL; [IAcadPreferencesDisplay] function [GRAPHICSWINMODELBACKGRNDCOLOR] unspecified error
Thanks,
Clint Hill
Comments
-
I stumbled over the same problem some days ago:
The type of the "BKGCOLOR"-Variable has changed from int to string in V20. I am not sure if this is intended (I guess it is, to allow for rgb values), but I adapted the code that I use to toggle between a dark and a bright background, see attached lisp file.Frankly, I wonder if the old vanilla lisp that I use is not more apt for such simple tasks, since it should be understood and editable by any user that knows how to set a variable...
0 -
I better understand the overall situation and greatly appreciate your attached file.
I am on and will be using v19 for some time.
It is interesting that the grey and white selections work as designed yet the black color will not and cannot be toggled from white.Any further findings would be appreciated.
Yours,
Clint0 -
The code you posted runs fine on V20 (Linux), so probably there has been an incompatibility in earlier versions.
If you want to follow the path that I suggested (using simple "setvar" statements), you would have to change the type of the BKGCOLOR-Variable back to integer (e.g. setvar "BKGCOLOR" 7 instead of setvar "BKGCOLOR" "7" ) in the code attached above.0 -
I thank you, Knut, and will do just that very thing!
0