Sunday, January 11, 2015

How to get Geotables Curve labels and tables to come in at the right scale

One of the hardest issues of using AutoCAD for new users is controlling text heights.  And one of the most common issues people have with Geotables curve, line, and point tables is getting the blocks to insert at the scale they want.  I will give first in this post the short fix answers.  Then I will explain what is going on.  If you don't want to do the first quick fix and you don't want to read the long explanation, just skip to the Other Fixes section at the bottom.

Quick Fix

The right answer on a well-run CAD team is to set INSUNITSDEFSOURCE to 0, meaning that if a block says it is Unitless or is unspecified, trust it and don't scale it.
Another quick fix is to tweak the scale of the labels and tables by adjusting your AutoCAD drawing dimtxt variable simply by using the DIMTXT command.  Simply increase or decrease the value as required to arrive at the label and table scale you need.  More fixes at bottom.

Under The Hood

The default Geotables blocks are Unitless.  This means that the text in the blocks is 1 unit high, rather than 0.1" high, 0.0083 feet high, or 2.5 mm high.  This is the strategy AutoCAD dimensioning has used since the early versions of AutoCAD.  The resulting text height for dimensions (and Geotables in its default state) is calculated by multiplying the drawing scale by the plotted (inches or mm) dimension text height.  The dimension text height is stored in the DIMTXT variable.  Historically, the drawing scale was expressed solely by the DIMSCALE variable.  In version 2008, Autodesk added the Annotation Scale, which is stored numerically in 1 / CANNOSCALEVALUE.  The AutoCAD interfaces that set the Annotation Scale change the CANNOSCALEVALUE variable and set the DIMSCALE variable to 1 /  CANNOSCALEVALUE.  Geotables reads the DIMSCALE or CANNOSCALEVALUE and the DIMTXT value and multiplies them to determine the text height.
If you are a civil engineer or surveyor, and your DIMSCALE is 100, your CANNOSCALEVALUE is 0.01, and your DIMTXT is 0.1 (1/10 inch), Geotables multiplies 100*0.1 and scales up the blocks 10 times expecting to get 10 foot high text that will plot 1/10" high at 1" = 100' scale.
The cruel twist is that in version 2000, AutoCAD introduced the concept of block insertion units, supposedly to make block scaling easier for everybody.  If you are a surveyor or a civil engineer, all your project drawings should have an insertion units of FEET.  The big idea is that if you get a drawing from an architect, its insertion units should be INCHES, and you can insert the drawing without scaling it 1/12.
But when a drawing (or block) has insertion units of UNITLESS, AutoCAD is not sure whether it is intentionally Unitless or merely a legacy drawing that is not specifying its units.  So AutoCAD uses two system variables you may not know about to guess what units to use in calculating automatic scaling.  The intuitive answer for unitless blocks (assuming they really are unitless and not simply unspecified) is that they should not be scaled by AutoCAD at all.  And it is probably reasonable, 15 years after block insertion units were introduced, to assume that if a drawing is Unitless, that is an intentional setting.

Other Fixes

There are two ways to make AutoCAD stop scaling the Unitless blocks:
  1. Set the default "Source content units" for unitless blocks to match your drawings (Feet for civil/survey) 
  2. Set the default "Source content units" for unitless blocks to Unitless
  3. Or if you don't want AutoCAD's help scaling blocks, set all your insertion units always to Unitless including the two Insertion scale selections show below, Source and Target units, and the insertion units of your drawing (from the command line: INSUNITS = 0, INSUNITSDEFSOURCE = 0, and INSUNITSDEFTARGET= 0)
Other possibilities besides getting AutoCAD to stop scaling the Unitless blocks are ways of changing the behavior of Geotables.
  1. Edit the General.TextHeight variable in Geotables.lsp (help is provided there) so it has a hard-coded height that works for you.
  2. Edit the seven blocks provided with Geotables so that they are your desired text height in whatever units you desire, and set their insertion units accordingly.  Then edit the General.TextHeight variable in Geotables.lsp so that it multiplies only as you desire.  I don't recommend this option.

No comments: