+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jan 2008
    Posts
    3

    Default Routine to change Layer Color

    Registered forum members do not see this ad.

    I'm looking to see if there's a routine that will change the background color to a specific color. Would be great if the routine would open up several drawings and do the color in order. Is this even possible? Any help would be appreciated. Working on AutoCAD 2008 right now.
    Tricia

  2. #2
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,639

    Default

    The title of the thread says "layer color", but your text says "background color". Not sure what you want to change.

  3. #3
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jan 2008
    Posts
    3

    Default

    Sorry, should be more specific! I work in the hvac field, and we get architectural backgrounds in. The routine would affect the layer manager though. Sorry for the confusion. It is actual the layer colors that would need globally changed across the board. At times we get in 18 different files that all need converted to a set color.

  4. #4
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,639

    Default

    So you want to change the colors of all the layers in all the XREFS?

    This will do it:

    Code:
    (command "._layer" "_C" "250" "*|*" "")
    That is lisp code. You can put it in a tool palette button, a toolbar button, paste it at the command line, or wrap it in a (defun) so you can type a shortcom...
    Last edited by rkmcswain; 9th Jan 2008 at 08:39 pm. Reason: add

  5. #5
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jan 2008
    Posts
    3

    Default

    Awesome I'll give it a go!!! Xref's should work, looking to change the actual background data color, though.

  6. #6
    Forum Newbie
    Using
    AutoCAD LT 2009
    Join Date
    Sep 2008
    Posts
    1

    Default

    Is there a way to change the color and preserve the on status of the layers?

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,818

    Default

    Quote Originally Posted by treed View Post
    Awesome I'll give it a go!!! Xref's should work, looking to change the actual background data color, though.
    Not sure if you want to play around with WMFBKGND variable?
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,818

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by lolcott View Post
    Is there a way to change the color and preserve the on status of the layers?

    Hi Lolcott and welcome to CADTutor,

    When changing the colour of a layer the original layer stays current, could you elborate on what you mean by "ON STATUS" please
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

Similar Threads

  1. When I change the color the dimensions change!
    By Mark Costantino in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 12th Oct 2009, 05:55 pm
  2. change color of layers
    By Tiger in forum AutoLISP, Visual LISP & DCL
    Replies: 14
    Last Post: 23rd Nov 2007, 06:26 pm
  3. Can I change color of layout?
    By Ste1978 in forum AutoCAD Drawing Management & Output
    Replies: 5
    Last Post: 28th Sep 2007, 12:14 pm
  4. how to change a layer color in a block made out several blocks
    By firsrate_caduser in forum AutoCAD General
    Replies: 6
    Last Post: 16th Nov 2006, 06:25 pm
  5. changing color in color control (layer )
    By ionica in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 10th Oct 2005, 07:45 pm

Bookmarks

Posting Permissions

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