Alex D. Fry, a civil drafting technologist, sends an AutoCAD table tip that uses formulas to create a scale bar.
"Here is a screenshot of the scale bar that I designed for my company:
You can use formulas to fill in the numbers along your scale bar. The bottom left cell (A4) is color 255, so it doesn't display when plotted. Cells B2 to F2 are formulas based on multiples of cell A4. The scale title is just text, except for the number 250 000. I have inserted a field that references cell A4:
%<AcExpr (A4) f "%th32">%
"Because the company that I work for does a wide variety of drawings, from large-scale mapping like this to structural details down to the mm, we needed multiple scale bars. So I have three versions of this scale bar: km, m, and mm.
"My scale bar block cannot be changed after insertion. First you must select km, m, or mm from the available visibility states, and explode it; then you can edit the scale. I have also built in even more scale bars that we use when more than one scale appears on a drawing, but this version is the more complicated one and once you can do this, you can come up with the rest, no problem."
Notes from Cadalyst Tip Reviewer Brian Benton: Setting up this block is simple enough, if you have used tables in AutoCAD or a spreadsheet before. Create your table, and enter your scale in the cell as described. For each cell that contains a length to scale, create a formula that reads the scale factor text and divides by the appropriate number. In the example given, the scale factor is 250 000. The first scale length is 2.5. Your formula for that scale (in an AutoCAD table) should be:
%<AcExpr (A4) f "%zs11%ct8[1e-005]%th32">%
(I know that doesn't make any sense, but AutoCAD understands it.)
Here is a simpler method: In cell A4, type in the number 250000. Click cell B2m once to activate the cell. Don't open the text editor. Right-click, and choose Insert and Field. In the Formula area, type in =A4 and click the Evaluate button. The preview at the top right should display the contents of cell A4. Click the Additional Format button. In the Conversion Factor area, type in the mathematical conversion needed to display 250000 as 2.5 (it should be 1/100000). Your preview should read 2.5. Keep doing this in each field until you have properly converted each scale factor.