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 🙂
Today I’m going to talk to you about a command that arguably has the coolest name ever to be given to an AutoCAD® command. The command is so cool in fact, that it didn’t want to go through the usual fuss of being a documented command. Therefore it’s actually one of those secret (undocumented) commands that Autodesk lets us find for ourselves.
The command is: TSPACEINVADERS
But what could such a bizarrely named command be for?
It is essentially a command for checking your drawing for TEXT and MTEXT entities that have other entities that “invade” the space of the TEXT or MTEXT. This makes it obvious where you might want to apply background masks and the like for your TEXT and MTEXT, so that they become more readable.
It becomes extra useful when we’re dealing with a large number of TEXT or MTEXT entities, because this command makes it very easy to make a selection of the relevant entities that need a background mask, which can then all be amended at once.
That’s all for today – but as a little side question, what are the commands you use that have the most interesting names?
P.S. As always, please do subscribe below if you found this blog useful. And do get in touch if you want to share a tip with us all! 🙂
Hi all, just a quick tip for today.
Probably my favourite entity in AutoCAD® is the polyline. However, there have been a few things in the past that I’ve found somewhat annoying, one of which is controlling the direction of polylines.
Normally the direction of polylines makes little difference, but for some purposes it can be important. For example, line-type text is oriented in line with the direction of the line segment, so if the polyline flows from right to left, as opposed to from left to right, the text will appear upside-down.
Reversing the vertices in a polyline has historically been quite cumbersome to achieve, but as of AutoCAD® 2010, there is now a REVERSE command. Simply enter the REVERSE command by either typing it, or selecting it from the Home ribbon, and select the polyline you want to reverse. This command can also be used on a few other entities, namely LINE, SPLINE and HELIX entities.
I hope you found this tip helpful, and I’ll have some more tips for you soon. 🙂
P.S, please make sure you subscribe to my blog, and forward on any useful tips you may want to share.
As this is my first post on HowToAutoCAD.com of 2013, I’d firstly like to wish you all a (somewhat belated…) Happy New Year!
Here’s a tip that was forwarded to me recently, by a chap named Santiago. I’ve used variations of this tool, which I have found to be very useful, and this one is equally so – the SSX command.
It’s essentially one of those really useful selection tools. Selecting things one by one is pretty cumbersome, and rarely are the changes we want to make only applicable to one entity. So if only there were a way to select a certain type of entity… You guessed it – that’s what SSX does. It allows you to select similar entities to the one entity you specify. So lets say you want to select all LINE entities on the very standards-compliant layer named “BOB”. All you’d have to do is type SSX followed by ENTER. Then, select a LINE entity that is on the layer you want (in this case, the “BOB” layer…), and AutoCAD® will add all relevant entities to the active selection set. Then, just manipulate the entities the way you want (such as forming the word “UNCLE”), and well, Bob’s your uncle.
See what I did there… ?
Depending on your AutoCAD® setup your selection may be cancelled after running this command. In which case, you can just invoke the command you want to use like MOVE for example, and then just use “p” for PREVIOUS.
Hopefully you will all find this useful – it’s just one of those commands that when used in the right place at the right time work wonders.
That’s all for now, and many thanks to Santiago for sharing this with us. If you have a tip that you think is useful, please please do get in touch. I very much appreciate all your contributions.
Equally, if there is any subject in particular that you want covered in a post, I’m always open to suggestions.
P.S. For those that haven’t already subscribed, please do so below. I can’t believe I’m up to over 500!