[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Change Objects to Bylayer
Tip# 3477 By Narinder Sharma On 15-Aug-2010
4.5
Rated By 2 users
Categories : Object Properties
Software type : AutoCAD 2011
Rename File To : No Files to download.
Quickly change the color of objects, including attribute text.

Tipster Narinder Sharma shows us a quick method for changing objects in AutoCAD to Bylayer.

"I had to create an additional view of a piping and instrumentation diagram in one color, except for a few objects which I wanted to show in another color. It was easy to change the color in VP Color, within Layer Manager — but it didn't do all of the work. Since the drawing has a lot of blocks and attributes, it did not change the color of all the attribute text (some attributes were set to Bycolor and some were set to Bylayer).

"I found an easy way to change everything globally instead of updating each block. Before I change the VP Color from Layer Manager, I type SetByLayer at the Command prompt and follow the onscreen instructions:

  • Select objects or (settings) : Select all objects in the drawing (in my particular case)
  • Change ByBlock to Bylayer? (yes/no) (yes) : yes
  • Include Blocks? (yes/no) (yes) : yes

After this short exercise, double-click inside the viewport and go to Layer Manager to change the VP Color of the desired layers. It will change the color of all objects, including Attributes."
 
Notes from Cadalyst Tip Patrol: If you get a file that has objects set to anything besides Bylayer, use this tip. Type SetByLayer on the Command line and pick your objects, just as Narinder describes. You can also select your objects, open the Properties Manager, and change the color setting there. Narinder used this tip in AutoCAD MEP 2010, but it works in any AutoCAD-based vertical.

AutoCAD objects have several basic settings, one of which is color. An object's color is very important because it can control several other factors. It is a good practice to draw everything as Bylayer; that allows the Layer Manager to control the display features of your drawing. If you assign a color to an object, you lose control; from then on, that object can only be displayed in that color.

Narinder mentions using the VP Color setting. It is a Layer Manager override that allows you to display the file's objects in a different color for a specific viewport. This gives you great control and flexibility when displaying your drawing objects.
 

 

Average Rating:
4.5


User comments
Comment by Tulis,Ralph
Posted on 2010-10-03 13:36:56
I would challenge the advice that "It is a good practice to draw everything as Bylayer". My blocks are created using ONLY layers 0 (zero) & DefPoints. Entity properties of color and linetype are set to ByBlock. When the blocks are inserted they obtain the color & linetype of the layer they are inserted on (ByLayer). I now have the ability to change the color or linetype of each individual block should I need to (hidden lines if behind an object; color to greyscale if needed), yet visibility is totally controlled by the layer they are on. I find that this works best for me in what I do.
Comment by Dunn,Mike
Posted on 2011-07-27 16:37:34
Ralph Tulis, I respectfully disagree w/ you in regards to TEXT being Color BYBLOCK. For other entities, BYBLOCK is good, for the reasons stated; but TEXT is special & should be kept separated from the other geometry in regards to Color. Way back in R12 I learned from a CADNazi boss (I use that term lovingly actually, because he is also one of the most intelligent people I have ever known) that TEXT is always color 2 (yellow) because it shows up so well on a black background making CAD editing much easier on the CAD Operator’s eyes (read staring @ a monitor 8-12 hrs a day); & Zoomed way out, everything yellow is easily distinguished as TEXT. Also, & almost more importantly, ALL text is to be on Layer TEXT, Color BYLAYER; Color BYLAYER is essential for text (DUMB text as well as SMART text) because plotter/printer LISP routines (my addition to his wisdom) set the Layer TEXT to color 2 (yellow) which is set in the CTB file to ALWAYS print Black (does anyone print color 2 as yellow?!!!) w/ a Lineweight of .0039” (~75% the default Lineweight). Now, for the biggest benefit of all the above, it is possible to print a D size dwg on A size paper & still read all the text; w/ very few exceptions (Simplex rocks). Obviously B size would even be more readable. Simple test, print the D size you are currently working on as A size. Now change ALL the text to color 2, set color 2 to print black w/ a Lineweight of .0039” & print it again as A size. Tell me that ain’t cool. Or perhaps I am the only CAD Operator that has been asked to print D, B & A size of the same CADfile; doubtful (oh yes, & a PDF to send to so & so). Using the plot/print lisp routines, & only 24 key strokes, we can produce 8.5x11 Black, 8.5x11 Color, 11x17 Black, 11x17 Color, 24x36 Black & 24x36 Color plots. That’s 6 separate plots, color & B/W, 3 different sizes; & that’s only Landscape, others for Portrait & PDFs.