You are here:

AutoCAD/Turning Off Layers which contain blocks

Advertisement


Question
QUESTION: I have a large number of Blocks, which have been created with some of their components on layer 0, and others on various other layers. The reason for using layers other than layer 0 is so that features residing on these layers made be selectively displayed.

When these Blocks are inserted on a particular layer, I would like these blocks no NOT be visible when that layer has been turned off. This used to work, but now only the block entities which were created on layer 0 are turned off, while block entities created on other layers remain visible.



ANSWER: Bryan
What happens when you freeze the layer instead of turning it off?  I believe that if you freeze the layer on which the block was inserted, the block will not be displayed, which apparently is the outcome you seek at this time.  

If you insert the block on a particular layer, then that particular layer should be the one you turn off.  You did that, so it's only reasonable to expect that all the contents of the layer would not display.  So that said, I agree with you.  In my experience, I have found that AutoCAD acts a lot more logically when I freeze and thaw layers than when I turn them on and off.

Also, we have even more control with VPLAYER overrides, working in layouts and freezing and thawing layers in the viewport.  When working with layer overrides like this, you need to keep in mind that the layout is also recognized as a viewport.  The viewports within a layout are really nested viewports.  If using that method, to ensure that all layers that are displaying that are supposed to, it's a good idea to thaw all layers before plotting the layout.

Let me know how it goes

Bill DeShawn
http://my.sterling.net/~bdeshawn


---------- FOLLOW-UP ----------

QUESTION: Thanks for your response Bill.

Freezing the layer does in fact produce the desired result. I do however have a need to achieve the same effect by turning the layer off because it is used in an AutoLisp routine, which has worked for years but now behaves as described. The AutoLisp file is automatically run when I load any drawing.

Is there a system variable or something of the sort which may be causing this or perhaps does AutoCad now handle layers differently than it used to? I also recall that Freezing a layer used to not turn off its visibility but only cause the layer to not be regenerated until thawed. Am I imagining all this?

Thanks once again for your time,

Bryan  

Answer
Bryan:


Autodesk does in fact change they way their commands behave from time to time, and sometimes (although rarely) without ever telling us.  Case in point ATTEDIT in Rel 13, corrected in R14.  What version of AutoCAD are you running?

Also, if the LISP routine is raw code, rather than protected, may I have a look at it?  Do you think it would cause problem for you if it froze the layer(s) as opposed to turning the layers off?


To get my email address, you can go to my website and click on the email icon at the bottom of the page.

Bill DeShawn
http://my.sterling.net/~bdeshawn

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill DeShawn

Expertise

I can address all 2-D questions and some 3-D questions. I do programming in AutoLISP if it doesn`t involve solid modeling. I can also address menu customization issues and can help you find answers to questions I can`t answer by taking your question directly to Autodesk via their newsgroups.

Experience

I used to do electronic and mechanical design for a flat panel monitor manufacturer, and now I do architectural drafting for an architect. I did and do AutoLISP and menu customization and take pride in making my lisp routines to do the work exactly the way the client likes them done.

Publications
I had a routine published in CADENCE magazine (no longer in publication and taken over by CADALYST). Some of my routines are published on my website at http://my.sterling.net/~bdeshawn

©2012 About.com, a part of The New York Times Company. All rights reserved.