Viewport Control Text Color
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can find lots of Active X properties like (vla-put-GraphicsWinModelBackgrndColor disp 0). Is there any property that defines the text color of the viewport control? If I change the background color to white, and if the viewport control is also white, then I need to change the VP control text color to something else to be visible. I guess it could be done with registry edits, since the value is stored in the registry for HKCU. What I am planning is to have a LISP routine that changes the display settings based on the user. So if I go to a specific users machine to help them, I can change the settings to my custom ones and then he can revert them to his settings. Those settings will be defined for each user by lisp.
Here I have the code that I compiled together using some of Lee Mac's code and some other code I found around.
(defun c:chd ( / disp drafting)
(setvar "cmdecho" 1)
(princ "\nLoading Menu...")
(initget 1 "BLACK WHITE GREY")
(setq MYCOLOR (getkword "\nChoose [BLACK/WHITE/GREY]: "))
(cond
( (= MYCOLOR "BLACK")
(vl-load-com)
(setq disp (vla-get-display (vla-get-preferences (vlax-get-acad-object))))
(setq drafting (vla-get-drafting (vla-get-preferences (vlax-get-acad-object))))
(vla-put-GraphicsWinModelBackgrndColor disp 0)
(vla-put-GraphicsWinLayoutBackgrndColor disp 0)
(vla-put-LayoutCrosshairColor disp 16777215)
(vla-put-ModelCrosshairColor disp 16777215)
(vla-put-AutoTrackingVecColor disp 16777215)
(vla-put-AutoSnapMarkerColor drafting 2)
)
( (= MYCOLOR "WHITE")
(vl-load-com)
(setq disp (vla-get-display (vla-get-preferences (vlax-get-acad-object))))
(setq drafting (vla-get-drafting (vla-get-preferences (vlax-get-acad-object))))
(vla-put-GraphicsWinModelBackgrndColor disp 16777215)
(vla-put-GraphicsWinLayoutBackgrndColor disp 16777215)
(vla-put-LayoutCrosshairColor disp 0)
(vla-put-ModelCrosshairColor disp 0)
(vla-put-AutoTrackingVecColor disp 0)
(vla-put-AutoSnapMarkerColor drafting 2)
)
( (= MYCOLOR "GREY")
(vl-load-com)
(setq disp (vla-get-display (vla-get-preferences (vlax-get-acad-object))))
(setq drafting (vla-get-drafting (vla-get-preferences (vlax-get-acad-object))))
(vla-put-GraphicsWinModelBackgrndColor disp 4605510)
(vla-put-GraphicsWinLayoutBackgrndColor disp 4605510)
(vla-put-LayoutCrosshairColor disp 16777215)
(vla-put-ModelCrosshairColor disp 16777215)
(vla-put-AutoTrackingVecColor disp 16777215)
(vla-put-AutoSnapMarkerColor drafting 2)
)
)
(princ)
)
CAD/IT Systems Admin Sr.
BIM / CADD MANAGER
CITY OF AUSTIN, PUBLIC WORKS DEPARTMENT
ENGINEERING SERVICES DIVISION