Backgroundcolor
Hallo,
i would change the backgroundcolor faster. With Acad i have a macro, but this macro not works in Bricscad (Linux-version).
;;; BackgroundChanger.LSP ver 1.0
;;; Lets you change the background in a simple way
;;; Works for both model space and paper space but could simply be customized for your need
;;;
;;; By Jimmy Bergmark
....
; Set the background in model and paper space to white
(defun c:BGWhite ()
(vl-load-com)
(setq disp (vla-get-display (vla-get-preferences (vlax-get-acad-object)))) -> ERROR in bricscad (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 6)
(princ)
)
The vla-functions are available. Has Bricscad another function then vlax-get-acad-object?
In the settings-dialog Bricscad has the variables "bkgcolor" and "bkgcolorps", stored in the registry.
But with setvar / getvar this variables are not available.
Is there a solution for this problem in Bricscad V11.1.16?
Christian Köhler
Comments
-
vla-get-preferences is not available for now.
I'm awaiting for it impatiently too (and for vla-get-menugroups, vla-get-activedocument, vla-removeitems, vla-appenditems, vlax-put-property ...)
(setvar "BKGCOLOR" n)
and
(setvar "BKGCOLORPS" n)
works as expected but only for n from 0 to 256.
0 -
Thank you, Stanislav,
now works fine. My color-numbers for the setvar-test was from Acad and to hight.
Christian
0