Sequentially Number AutoCAD Text Objects21 Sep, 2014
Have you ever needed to number a variety of text objects in your drawing file? It’s so tedious to do this manually! In this video tip from Cadalyst and Lynn Allen, you’ll see how to sequentially number selected text objects with the AutoCAD Express Tool TCount instead.
Hello there. This is Lynn Allen. Welcome to another AutoCAD tip courtesy of Cadalyst magazine. Thank you for joining me. Today we are going to talk about another Express Tool because you know how I love my Express Tools. This particular Express Tool really comes in handy in case you have text on your screen -- single line text or mtext -- that you want to number sequentially.
Let me show you what I'm talking about. It's going to make your life so much easier if you ever run into this situation. So I have a variety of text strings on my screen. That's very hard to say. I'm going to go over to my Express Tools, and I'm going to select Auto Number, and that executes the TCount command -- great command, fabulous command. I'm going to go ahead and select these text strings over here. You'll notice I picked them in a specific order. That's the order it's going to increment them as well. So that's kind of important.
Now there's a variety of ways to do this. I'm going to do by the order that I selected the objects. You can see that down here on the command line -- the select order. You are going to tell it the number you want it to start with and the increment. We can start with 1 and increment by 1. That sounds easy enough. Now do I want to overwrite the existing text, do I want to do a prefix, suffix -- we'll take a look at these various options. I'm going to start by just saying Overwrite. Okay. You can see I got 1, 2, 3, 4. Okay, let's undo that.
Let's try that again. You'll see these are Lisp routines, which means they don't work in LT unfortunately. Most of the Express Tools don't work in LT. Let's try Auto Number again. Now this time I'm going to do what most of us tend to do, I'm going to window it, and I'm going to go with Select Order again. We'll do the exact same thing, and I want you to see it goes the other way because when I put the text on the screen I did it from top to bottom because that's what we often do and the last object that is stored in the database always is the first object to AutoCAD. So, you don't want to do it like that. Because you don't really know what order it's going to come up with. So you are always going to want to pick them specifically.
There's other ways of doing it though. Let me show you another way of doing it. So let's go right back into TCount. Use your arrow key, Lynn. Another lazy thing about AutoCAD. I'm going to go ahead and I'm just going to window these guys and you'll see when it asks me how I want to sort these objects, I'm going to say in the Y. It actually goes in a decreasing Y level. I'm going to say Y, decreasing. So it should go from top to bottom. We'll do the same 1 and let's say we want it to increment by 5, for example. Let's just totally go crazy and shake it up. This time I going to do a prefix just to show you what that looks like. You can see that it had the number 1 and then it added 5 to it and it got 6, add the next number to it and got 11, and added the next number to it and got 16. It went from the top to the bottom. So that's a prefix. I don't know why you would want to increment by 5 like that, but you could. So I'm going to undo that.
Let's do that one more time. Let's go into TCount. Let's go back into TCount. I'll pick it on the screen, make it easier for you to see. I'm going to go ahead and I'm going to select these objects over here. Oh, what happened. That's the new Lasso inside of AutoCAD 2015. We'll talk about that another day -- the Lasso option, which many of us discovered by accident. Then I'm going to go ahead and I'm going to say, this time I want to sort using the X. So when you pick Y, it goes in descending order. When you pick X, it goes in ascending order. So it should go from left to right. So I'm going to say X. Let's start with 10 and we'll increment by 1. So we're going to start with the number 10 and we're going to add 1 to it each time. Now let's see what else can we do. We already did prefix, let's do suffix. You should see it goes from left to right. Because I selected the X. It goes in the positive direction. You following me? It's very easy actually. Okay, let's undo that.
So there's one other option that we haven't explored, and that is Find and Replace. Let me show you how that one works. So let's go back into TCount, and I'll pick them manually. Why not? I want to use the Select Order. I'm going to say the start increment of 1 with increment of 1. Why not, let's make it easy. Let's look at that Find and Replace. I'm going to say Find. I want it to replace of the Es with these numbers. So I'm going to say E, and you'll see that it goes through and it replaces each of the Es with a number and it stair steps it sequentially. Did you get that? Did I confuse you? I hope I didn't confuse you. If I did, try it yourself. You'll totally get it, it's easy, easy, easy to use. It will save you time if you find yourself in a situation where you need to be sequentially numbering text objects, okay? It's going to save you lots of time. It's awesome. Give it a try. We love our Express Tools. Until next time, I hope you have a great rest of the week.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD Video Tips. Subscribe to the free Cadalyst Video Picks newsletter, and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!