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

Display Colours

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
197 Views, 3 Replies

Display Colours

Rather than going Tools > Preferences > Display > Colours.... I would like
to change the screen display from blck to white or white to black
backgrounds with a script on the toolbars....

Any help you can give would be useful...



Many thanks
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

This is basically the same thing, but also toggles the crosshair color.

Don

"Lizzy" wrote in message
news:2E5B5A0A77F34ABBCD9E97557521701A@in.WebX.maYIadrTaRb...
> Rather than going Tools > Preferences > Display > Colours.... I would like
> to change the screen display from blck to white or white to black
> backgrounds with a script on the toolbars....
>
> Any help you can give would be useful...
>
>
>
> Many thanks
>
>
>
Message 3 of 4
Anonymous
in reply to: Anonymous

Sorry, put in the wrong PaperSpace test.

Don

"DonB" wrote in message
news:271D206435A2A0F396BA571ECFCB3773@in.WebX.maYIadrTaRb...
> This is basically the same thing, but also toggles the crosshair color.
>
> Don
>
> "Lizzy" wrote in message
> news:2E5B5A0A77F34ABBCD9E97557521701A@in.WebX.maYIadrTaRb...
> > Rather than going Tools > Preferences > Display > Colours.... I would
like
> > to change the screen display from blck to white or white to black
> > backgrounds with a script on the toolbars....
> >
> > Any help you can give would be useful...
> >
> >
> >
> > Many thanks
> >
> >
> >
>
>


----------------------------------------------------------------------------
----


(defun c:ToggleScreenColor (/ dcolor newcol crosscol prefdisplay)
(vl-load-com)
(setq prefDisplay (vla-get-display (vla-get-Preferences
(vlax-Get-Acad-Object))))
(vla-get-Display AppPreferences)
(if (is-paper)
(setq dColor
(vlax-variant-value
(vlax-variant-change-type
(vla-get-GraphicsWinLayoutBackgrndColor prefDisplay)
vlax-vbLong
)
)
)
(setq dColor
(vlax-variant-value
(vlax-variant-change-type
(vla-get-GraphicsWinModelBackgrndColor prefDisplay)
vlax-vbLong
)
)
)
)
(setq newcol (vlax-make-variant (if (= dColor 0) 16777215 0) vlax-vbLong))
(setq crosscol (vlax-make-variant (if (= dColor 0) 0 16777215) vlax-vbLong))
(if (is-paper)
(progn
(vla-put-GraphicsWinLayoutBackgrndColor prefDisplay newcol)
(vla-put-LayoutCrosshairColor prefDisplay crosscol)
)
(progn
(vla-put-GraphicsWinModelBackgrndColor prefDisplay newcol)
(vla-put-ModelCrosshairColor prefDisplay crosscol)
)

)
)
;;;IS-PAPER returns T if in NON-FLOATING PaperSpace
;;;ELSE nil for floating or complete ModelSpace
;;;Example (if (is-paper) )
(defun is-paper ()
(cond
((and (= (getvar "tilemode") 0)(/= (getvar "cvport") 1))nil)
((and (= (getvar "tilemode") 0)(= (getvar "cvport") 1))t)
(t nil)
)
)
Message 4 of 4
Anonymous
in reply to: Anonymous

I suspect you wish to do this for when you cut/paste from Autocad and you
don't want the black background.
The following tip, from Ken Alexander, sets the background to transparent
for cut/past operations.

Jon

From Ken ->

Try using the wmfbkgnd system variable setting.

0 makes the background transparent
1 makes the background color the same as the autocad
current background color.

--
Ken Alexander
Acad2000
Win2000prof.

"Lizzy" wrote in message
news:2E5B5A0A77F34ABBCD9E97557521701A@in.WebX.maYIadrTaRb...
> Rather than going Tools > Preferences > Display > Colours.... I would like
> to change the screen display from blck to white or white to black
> backgrounds with a script on the toolbars....
>
> Any help you can give would be useful...
>
>
>
> Many thanks
>
>
>

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

Post to forums  

Autodesk Design & Make Report

”Boost