Sequentially Number Text with TCOUNT

image Among the comments recently left on The CAD Geek was one asking if I could help them out with a script to sequentially number text.  The solution is perhaps easier than one may think. In fact chances are, you already have such a tool at your fingertips.  Housed within the infamous Express Tools is a command known as “Automatic Text Numbering”, or for the command line warriors – TCOUNT.

The TCOUNT command has a bunch of hidden secrets contained within it.  Sure, it knows how to count 1, 2, 3, 4, 5, …, but what about 2, 4, 6, 8? Those writing cheers with AutoCAD will appreciate the fact the TCOUNT command can indeed do this.

Beyond that what other tricks does the TCOUNT command have up it’s sleeve? Well it also has the ability to prefix or suffix your text with a number, or of course replace it altogether. So enough talk, how does one use this hidden gem?

Sequentially Numbering Text

  1. Enter TCOUNT at the command line, or execute it from the “Express > Text > Automatic Text Numbering”

  2. Although the TCOUNT command allows you to window select text, I generally recommended selecting each piece of text individually.
  3. You will next be prompted to “Sort selected objects by”. If you happen to have neatly arranged text, the X or Y option may work for you. However a more common scenario is to have text scattered throughout my site, and thus the Select-order generally gets me more mileage.
  4. Next I’ll be prompted to Specify starting number and increment (Start, increment) <1,1>. The default is to start with 1, and step by 1. Thus under thus my first piece of text will be numbered 1, my second 2, etc… You could certainly change the increment to 2, and your first piece of text would be numbered 1, your second 3, your third 5, etc…
  5. Finally you will be asked Placement of numbers in text. In this case I want to replace my text with the respective number, although I can have the command prefix or suffix my text with the respective number.

And that’s it. I now have a series of text sequentially numbered to my liking.

About Donnie Gladfelter

Donnie is author of the book and Autodesk Official Training Guide, AutoCAD and AutoCAD LT: No Experience Required, a columnist for AUGIWorld Magazine, Autodesk University speaker, and former member of the AUGI Board of Directors.

  • Richie

    Will you show me how to increase a group of numbers by .01? For example 120.01, 120.02, 120.03, 120.04,…..ect

    • anonymous

      instead of his example of “A”, you can replace that with 120.0 and then tcount starting from 1 increasing by 1 and suffix it.

  • TCountUser

    i tried this tcount command yesterday, now im having trouble on making the numbering in the “Y” axis go the other way, the default numbering is downwards now the question is how to make it count upwards. the select order is quite not practical to use because i need to select hundreds of numbers. please help!

    • Fi

      make sure the text is in a separate layer.
      use layiso command to isolate the layer of text.
      simply do a window selection to choose text.
      apply to selection and the command will disregard items not in the appropriate layer.
      OR use the quick select function

  • dj

    if tcount is not working so which type of prblm can be