BCOUNT is a very simple and quick command for extracting information from your drawing, namely, a count of the number of blocks in your drawing, categorised by their type.
It’s really simple to use – just enter BCOUNT in the command line and make a selection. The command line will then report to you the total number of blocks selected, followed by a list of the block types, and how many of each type were selected.
This can be a really useful way to get a quick overview of what’s going on in your drawing. If you’ve inserted a load of markers for certain things on a location plan for example, and you know the total number of each type that you should have added, this is a great way to double check your work. But do be careful though, because dynamic blocks can sometimes be missed if you have used any of the dynamic options.
That’s it for today,
I’ve often been in a situation where a certain command or entity seems to behave differently in one drawing compared to another. Things such as how drawing units are handled are controlled on a drawing by drawing basis, by saving system variables in the drawing. With this in mind, it can be very useful to try to reverse engineer the differences between two drawings, so that you can identify what the offending system variables might be. Identifying these variables and tracking down the root cause to our problems is fundamental to attaining a good grasp of AutoCAD®, so that we will know how to tackle similar problems in future.
I’ve invented a neat way of tracking down the differences between two (or more) drawings, and it’s using an express tool called SYSVDLG. You can also access this command from the Express Tools ribbon tab, in the Tools section. Once you’ve started the command you’ll be presented with this:
This screen allows you to edit the values saved in system variables. This is great functionality, but for the purposes of our comparison between drawings we are after the “Save All” option. This option exports all system variables to a SVF file.
The SVF file is simply a text file that contains the variable name followed by its value. Although it’s not a native format to Excel, we can still open it using Excel and it will be opened with the data populated in the first column of the spreadsheet. You can simply repeat this export process for any other drawings you want to compare against, and just copy and paste the columns into the same spreadsheet like so:
Now that you have the two (or more) columns side by side, you can enter a simple formula to compare the columns. As shown above, we are just using a simple IF statement in excel to check the values of the cells, and if they’re not equal to each other then display the text “!! DIFFERENT !!”, otherwise display nothing. This is a very quick way of identifying differences that may not be immediately obvious when skimming down.
I hope you find this tip as useful as I have in the past – I’ve lost count of the number of times that I’ve been caught out by an obscure system variable that I didn’t even know existed, which was for some reason changed in a drawing that I’d inherited from someone else !
If you found this tip useful please do consider subscribing below, and if you have a tip you’d like to share, let me know!
Very quick tip to supplement the last post I wrote on Groups, which comes to us thanks to one of my subscribers named Santiago.
I mentioned that the behaviour when selecting a group is controllable using the groups dialog box by modifying the checkbox marked “selectable”. Well this corresponds to the system variable PICKSTYLE, so if you’re more of a keyboard user than a dialog box user, you can use that instead.
Knowing this system variable is also handy if you want to change the way groups work in LISP for example. Using something like:
(setvar “PICKSTYLE” 0) or (setvar “PICKSTYLE” 1)
will toggle group selection mode, so that you can use groups in your LISP routine how you want.
That’s all for today. Thanks again to Santiago, and I’ll post again soon.
Blocks are very useful, and you might be tempted to ignore the existence of groups and just always use blocks instead. However, groups actually work differently to blocks, and in many cases it is actually more useful to use a group instead of a block.
One of the main advantages of using a group instead of a block is that you are free to include the same entity in more than one group. So, if a certain set of entities belong to more than one commonly selected group of entities, you can just create the two (or more) groups that contain the same set of entities (and whatever other entities are relevant to that group), and you’re now able to select the entire set by clicking on only one of the entities, as you would with a block.
To use groups, simply invoke the GROUP command, or you can select “Group” from the groups panel on the home tab. This will display the object grouping dialog box, which will allow you to manage and name your groups. Bear in mind that the selectable property controls what happens when you select one of the entities in a group. With the option checked the entire group is selected, but with the option deselected only the individual entity is selected.
So in summary, use groups – don’t just always use blocks if you’re not actually repeatedly using them, because this will introduce unnecessary bloat into your drawings, and often groups are functionally more what we’re after anyway.
That’s all for today,
P.S. Please subscribe below, and feel free to forward on your tips!
As of AutoCAD® 2008, we have a new command for dealing with the layering properties of objects en-masse. The SETBYLAYER Command.
As you’d expect, this is used for setting properties to ByLayer (as they mostly should be). You might say that you can do that already by just selecting everything and changing the layer in the properties window to ByLayer. But the beauty of SETBYLAYER is that it gets into all the corners of your drawing – this one will go through every block, layout and pretty much everything else, and will change it all to ByLayer. Very useful, especially on those drawings which seem to contain loads of nested blocks with obscure properties.
There is also a menu for controlling the behaviour of the command, which also corresponds to the SETBYLAYERMODE system variable.
The variable is saved at application level, so changes you make to SETBYLAYERMODE will persist between drawings. To access the menu type “S” in the command line after invoking the SETBYLAYER command.
I hope you find this as useful as I do – it’s one of my favourite commands for cleaning up drawings.
P.S. Finally, as usual I’d like to encourage all non-subscribers out there to pop your email address into the box below. I’ve loads of tips and tools to share with you all, and I want to spread the word as far as possible!
Quick tip for all of you using AutoCAD® verticals such as Civil 3D®. You’ll no doubt have noticed that if you open drawings created in an AutoCAD® vertical will have it’s native objects displayed as OLE objects in vanilla AutoCAD®. It can sometimes be difficult when you only have access to vanilla AutoCAD® to make use of drawings with OLE objects, but there is a convenient command specifically set up to export your drawing from the vertical using only entities available in vanilla AutoCAD.
The command is -EXPORTTOAUTOCAD. Make special note of the dash preceding the command, which is required. If you find it more memorable you can also use the AECTOACAD command, which is just an alias for invoking the same thing.
Of course, any drawing that has been exported via this means will not contain the functionality you’d get from the AutoCAD® vertical, but it makes the entities much more useful in AutoCAD.
That’s all for today, more tips to come.
Recently someone showed me a really simple, and rather obscure tip that I thought was pretty neat. I must admit, I’m yet to find a practical use for it, but I’m sure as with many other obscure commands it’ll be extremely useful in that once-in-a-blue-moon occasion that demands it…
Autodesk have evidently made it possible to copy and paste layers from the layer dialogue box to a text format, either in a text editor, or most conveniently, directly into Microsoft Excel. Simply select the layers you want to copy, press CTRL+C and just paste it into your spreadsheet. There, you could perhaps report on … something ?! Like I said, I haven’t found a practical use for this yet – but let me know what you all come up with, now that you know this functionality exists!
That’s all for today,
P.S. If you liked this tip please do subscribe below, and do forward on any tips you want me to share 🙂
Hatching is one of the easiest, least irritating, and straightforward commands in AutoCAD.
But there are quite a few other commands that can help with the little things – for example, it can be quite frustrating when all you want to do is create a small, simple solid hatch, but you still have to jump through all the hoops of clearly defining a boundary or messing with picking points, which as I’m sure you all know can sometimes be very frustrating! In this case I generally use the SOLID command.
Using the solid command you have to pick either three or four points, and a solid hatch will be created immediately. This is great for quickly hatching simple shapes, and is extremely reliable and fast.
The order of your clicks can be important though, but once you get the hang of picking points in a sort of Z shape as opposed to going around in a circle, it will become second nature.
That’s it for today,
P.S. please subscribe and send me your suggestions for what you’d like me to cover!