Visual LISP, AutoLISP and General Customization

Reply
*Lizzy
Message 1 of 4 (73 Views)

Display Colours

73 Views, 3 Replies
09-20-2001 12:10 AM
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
*DonB
Message 2 of 4 (73 Views)

Re: Display Colours

09-20-2001 02:06 AM in reply to: *Lizzy
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
>
>
>
*DonB
Message 3 of 4 (73 Views)

Re:

09-20-2001 02:39 AM in reply to: *Lizzy
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)
)
)
*Ras, Jon
Message 4 of 4 (73 Views)

Re: Display Colours

09-20-2001 06:19 AM in reply to: *Lizzy
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
>
>
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community