• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    CAD Managers

    Reply
    Active Member
    Posts: 7
    Registered: ‎08-20-2008
    Accepted Solution

    Re-Set color, linestyle, line weight to Bylayer

    1050 Views, 7 Replies
    02-23-2012 04:02 PM

    Many times I have found users have selected a different color, weight, etc than the "Bylayer" settings of a layer.

     

    Is there a simple, fast way to re-set all the BYLAYER control settings besides selecting each one and setting bylayer?

    I was thinking perhaps a custom icon on a toolbar. I have not been able to find the specific command language and how those commands might be strung together.

     

    Any help would be appreciated.

    Thanks,

    Mark

    Please use plain text.
    Mentor
    skintsubby
    Posts: 470
    Registered: ‎09-29-2004

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-23-2012 11:33 PM in reply to: ldcadman

    Try the SETBYLAYER command... and add it to an icon macro

     

    I've not tried it but it'll be something like...

     

    ^C^C-SETBYLAYER;ALL;;;^C^C

     

    Mark

    Please use plain text.
    Active Member
    Posts: 7
    Registered: ‎08-20-2008

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-24-2012 08:39 AM in reply to: ldcadman

    Ok, I tried that - it changes the actual elenets in the file.

    I don't want to do that although it be usefull

     

    What I would like to do is re-set the color, line type and weight  to "By Layer" in the Properties toolbar.

     

     

    Mark

    Please use plain text.
    *Expert Elite*
    pendean
    Posts: 14,896
    Registered: ‎11-06-2003

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-24-2012 10:25 AM in reply to: ldcadman

    Do you just need to set what gets changed with SETBYLAYER command?

    http://exchange.autodesk.com/autocad/enu/online-help/ACD/2012/ENU/pages/WS1a9193826455f5ff104f57f10e...

     

    Or just change the selection in that macro from ALL to something else?

     

    Or are you talking about something else when you state "..it changes the actual elenets in the file..."?


    Dean Saadallah LT BLOG | RSS Feed | LT Tips | PINS
    Please use plain text.
    Active Member
    Posts: 7
    Registered: ‎08-20-2008

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-24-2012 10:59 AM in reply to: pendean

    I am looking for an easy, efficient way to set the color, line type and weight to BY LAYER in the Properties Toolbar with one button, instead of having to select each in the Properties Toolbar and set it to back to BY LAYER after someone else has selected another value for them that propably isn't a CAD Standard.

     

    I am not looking for a way to change the attributes of elements in the file.

     

     

    Thanks,

    Mark

    Please use plain text.
    *Expert Elite*
    JGerth
    Posts: 1,122
    Registered: ‎12-05-2005

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-24-2012 01:40 PM in reply to: ldcadman

    CECOLOR BYLAYER

    CELWEIGHT 1

    CELTYPE BYLAYER

    CETRANSPARENCY BYLAYER

     

    should get you started

    Please use plain text.
    Active Member
    Posts: 7
    Registered: ‎08-20-2008

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-24-2012 02:42 PM in reply to: ldcadman

    Thanks for all the suggestions, most worked.

    However, after some trial and error, the value of -1 will set the line weight to BY LAYER in the Properties Toolbar

     

    Thanks again,

    Mark

    Please use plain text.
    Active Contributor
    Posts: 39
    Registered: ‎09-23-2008

    Re: Re-Set color, linestyle, line weight to Bylayer

    02-27-2012 05:16 AM in reply to: ldcadman

    I'll throw my 2 cents in as well.  I run into this quite often with our drawings, so I have a lisp routine that I use:

     

    (defun c:BYL ()
    (setq uecho (getvar "cmdecho"))
    (setvar "cmdecho" 0)
    (prompt "\nSelect Items To Change To BYLAYER :")
    (setq ps1 (ssadd))
    (setq ps1 (ssget))
    (command "CHANGE" ps1 "" "P" "C" "BYLAYER" "LT" "BYLAYER" "LW" "BYLAYER" "")
    (setvar "cmdecho" uecho)
    (princ)
    )

     

    Once this is loaded you can make a button on the toolbar/ribbon to run the command

    Ryan A Wunderlich
    Royal Caribbean Cruises Ltd.
    Please use plain text.