Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does anyone know how to control the background color through autolisp?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
hypersonic
330 Views, 1 Reply

Does anyone know how to control the background color through autolisp?

I know you can change it through config, display, colors settings, but I can not seem to find the variable that it changes....

 

thanks!

1 REPLY 1
Message 2 of 2
hypersonic
in reply to: hypersonic

 

This works!  found in another post something similar and was able to modify....

 

(defun c:cb_white ()

; model - background white, crosshair black ;
 (vla-put-GraphicsWinModelBackgrndColor
 (vla-get-display
 (vla-get-preferences
 (vlax-get-acad-object)
 )
 )
 16777215
 )
 (vla-put-ModelCrosshairColor
 (vla-get-display
 (vla-get-preferences
 (vlax-get-acad-object)
 )
 )
 0
 )

);end defun

;(vla-put-ModelCrosshairColor)
;(vla-get-ModelCrosshairColor (vla-get-display (vla-get-preferences (vlax-get-acad-object) )
; )
; 2
😉

 

 

(defun c:cb_black ()

; model - background white, crosshair black ;
 (vla-put-GraphicsWinModelBackgrndColor
 (vla-get-display
 (vla-get-preferences
 (vlax-get-acad-object)
 )
 )
 0
 )
 (vla-put-ModelCrosshairColor
 (vla-get-display
 (vla-get-preferences
 (vlax-get-acad-object)
 )
 )
 200
 )

);end defun

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost