ZWCAD Hot tutorial: Walking Through Layers with LAYWALK

Have you ever needed to check whether objects are on the correct layers of your drawings? Is everything on the right layer? Have you repeatedly toggled layers on and off to show and hide them for temporary viewing?

All of these actions (and others) can be accomplished with a simple but useful command in ZWCAD 2011, LAYWALK – short for “layer walk”. Let’s take a look at how it helps you manage layers in your drawings.
Tutorial 1: Showing and Hiding Layers
When you first open the Layer Walk dialog box with the LayWalk command, all of the drawing’s layer names are listed. All those not turned off are down selected (are highlighted) automatically, so you can see the layer visibility settings as they were in the drawing before you started this command.

Now, whenever you select a layer name from the list, the corresponding layer is displayed in drawing area, and other layers are turned off instantly. (You don’t need to exit the dialog box to see the changes.) This allows you to view dynamically only the objects assigned to this layer.
You can hold down the Ctrl key to select more than one layer for viewing at a time; also, you can hold down the Shift key to select a contiguous group of layer names. A simpler way to select multiple, contiguous layer names is to click on one layer, and then drag down the list with your mouse.
The dialog box works in reverse, too: when you choose one or more entities in drawing by Pick button, the dialog box highlights the layer names of those entities. In this way, it functions like the Layer Isolate command.


Tutorial #2: Filtering Layer Names
At the top of the Layer Walk dialog box, there is a text entry box, in which you can input expressions to filter the names of layers. This shortens the list of layer names displayed, and is very useful in complex drawings with many layers. The filter function supports wildcard characters, such as * (all characters) and ? (any single character). For example, if you want to list and view all layer names starting with the letters “gr”, then follow these steps: (1) enter gr*” in the text entry box, and then (2) tick the “Filter” option. Notice that the dialog box lists only those layer names that begin with “gr.”


Tutorial #3: Using the Right-click Menu
You can right-click on the list of layer names at any time to display context menu with additional functions for selecting, viewing, and summarizing the layers.



For example, the Hold Selection option keeps your current selection always turned on as a reference; based on it, you can select other layers. The on-hold layer is prefixed with the “*” character; you can select it, release it, or release all.
Another useful option is Inspect, which provides a detailed summary of the currently selected layers; see the figure below.


Tutorial #4: Using Other Controls in LayerWalk

You may notice the Purge button at the bottom of the dialog box. It allows you to purge empty layers from drawings, those layers that have no entities. This button is disabled until you select one or more empty layers.

The Restore on Exit option means that the layer state will be restored after you end this command -- regardless of what you’ve done while in the dialog box. When this option is turned off, keeps the layer state when you exit the dialog box, which can be very useful.
 
By the way, this command works both in model space and in layout tabs.

ZWCAD Hot tutorial: How to Delete Stubborn Layers


In your daily design work, you may encounter the same issue I do: sometimes there are too many layers in my drawings, many of which have little or nothing on them. I can't, however, seem to delete them, even with the Purge command. When there are so many layers, I find that they make my design work more inconvenient.

This issue annoyed me long enough that I figured out some methods of how to get rid of them. I can’t wait to share them with you.

We usually use Purge command to remove the unused named items from the current drawing, such as the blocks, layers, linetypes, text styles, and dimension styles that are not being used.

Sometimes, however, layers are nested in blocks, and in this case Purge seems to not work. Some users have suggested that the Delete Layer command is available, found in ZWCAD under the Layer sub-menu of the Express Tools. Yes, it works. But it is not the best way, because it will also delete layers that contain objects.

Your drawing could definitely incur some damage if you aren't paying attention!

Here are some other methods that I want to share with you:

Method 1: Copy'n Paste
a.            Turn off the useless layers.
b.            Select all objects.
c.             Copy them (Ctrl+C or CopyClip command), and then paste them (Ctrl+V or PasteClip) to a new drawing.

Method 2: WBlock
a.            Select the objects you want to remain.
b.            Use the WBlock command to write these objects to a new drawing file.

Method 3:  LayTrans
a.            Use the LayTrans command to translate the layers you want to delete to another drawing file or new drawing file.

These are my quick tips on how to delete stubborn layers. If you have a better method, or tips on other aspects of making CAD operations more efficient, please share them with us on the ZWCAD forum. Let’s move ahead, together!

ZWCAD Hot Tip: The Many Ways to Count Blocks in Drawings


Sometimes we need to count the number of blocks that exist in our drawings. It turns out that there are several approaches to doing this in ZWCAD. Let me share them with you.

Approach 1:  BCOUNT

Here is how to use the BCOUNT command to count all or just a selected group of blocks in drawings:
1.     Enter the BCOUNT command.
2.     Select the objects you want to count, and then press Enter.
3.       Notice that the name of each block and the number of its occurrences appear on the command line. To see all of the details, press F2 to get to the Text window, a big version of the command prompt area. It looks something like this:


As a bonus, this method also reports the number of each kind of block in the selection set.

Approach 2:  BLOCKSUM
The BLOCKSUM command does not count the total number of blocks; rather, it is used to count how many blocks are on a specific layer, and how many have the same name.
The BLOCKSUM command can be accessed from ZWCAD Express menu: Express > Tools > Number of Blocks.


Follow these steps to use the BLOCKSUM command:
1.     Enter the BLOCKSUM command, or select it from the Express menu.
2.     Notice that it prompts you, ‘Layer/selection Set/<All>’. There are two choices, Layer, or select a specific number of objects:
                - Layer option counts the number of blocks on the same layer as the selected block.
 - selection Set option counts the number of blocks that have the same name as the selected block.
3.     When you input L to choose the layer option, it prompts you, ‘Select an object on the layer or <exit>:’. Select a block, and then press Enter.  
Notice that the command line it reports, ‘[Number of] blocks on layer [layer name]’.

Approach 3:  Attribute Extraction

The BCOUNT and BLOCKSUM commands are specifically meant for counting blocks. There is also an indirect way to count them, through attribute extraction. The AttExt command extracts all kinds of data from blocks, such as attribute values and X,Y coordinates -- and it also extracts the number of blocks. The result is similar to that of BlockSum, in that it lists the names of blocks and the number of occurrences. See the figure below.


Approach 4:  QSELECT
ZWCAD's quick select feature is yet another indirect way to count blocks. Here is how to use the QSELECT command for this task:
1.     Enter the QSELECT command.
2.     In the dialog box that appears, set the following options:
Object type=Block Reference
Color=Bylayer
 (We assume that all of the block’s colors are ByLayer.)
3.     Press the OK button. Notice that all the selected blocks are highlighted. The command line prompts us that there are X item(s) selected, so we know how many blocks are in this drawing.


In addition to these ways of counting blocks in drawings, we could use LISP programs, but I think above four methods are enough for block counting. I'm glad to have shared them with you.