Results 1 to 7 of 7

Thread: Change background color

  1. #1
    Login to Give a bone
    0

    Default Change background color

    Hi
    I am attempting to write a lisp to change the color of the model space background on Start up.
    I need a lisp to place in the acaddoc.lsp that on boot up will change the background to a true black rather than the default color (an off black).
    This is what I have, but it does not work.
    Code:
    (if (= (getvar "Background") "3156001") (SETENV "Background" "0"))

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Change background color

    Number of lisps out there for doing this already you would only have to set your colors in one of them.
    http://jtbworld.com/autocad-backgroundchanger-lsp

  3. #3
    Login to Give a bone
    0

    Default Re: Change background color

    Thanks for the reply.
    The site has scripts to change color, but I don't see a if then statements.
    I only want the color to change automatically on start up if its the default color set for the background for model space..

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Change background color

    Change your getvar to getenv and your code should work.

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Change background color

    Here is something that might help:

    http://cadpanacea.com/wp/?p=242
    R.K. McSwain | CAD Panacea |

  6. #6
    Login to Give a bone
    0

    Default Re: Change background color

    thank you very much. This now works great.
    Much appreciated.

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Change background color

    That said the "3156001" seems easier on my eyes. I have a toggle to display same as plotted, but a separate toggle to display plot styles is all I usually use.
    Whatever works best for you is the way to go.

Similar Threads

  1. 2015: How to change Revit Background Color!
    By Cosmic Traveller in forum Revit Architecture - General
    Replies: 4
    Last Post: 2017-04-08, 03:07 AM
  2. Change Background Color for outside layout
    By Capt. Computer Crasher in forum AutoCAD General
    Replies: 2
    Last Post: 2009-11-17, 09:48 PM
  3. Change Background color of Cells
    By Jack Cheong in forum AutoCAD Tables
    Replies: 1
    Last Post: 2008-05-22, 11:33 AM
  4. Why would MS background change color?
    By kleenhippie in forum CAD Management - General
    Replies: 1
    Last Post: 2008-01-25, 03:06 PM
  5. Change Field background color
    By ccowgill in forum AutoCAD Fields
    Replies: 3
    Last Post: 2006-02-09, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •