Learning Curve: Scaling the Highest Block7 Nov, 2006 By: Bill Fane
A brief dissertation on scale factors when blocks and xrefs are inserted into drawings.
It was a warm, sunny September evening. Captain LearnCurve and his gorgeous wife were at their summer cabin at the lake. Their back-fence neighbor is the Captain's youngest brother Graham, who has become an avid fisherman. Graham had been fishing the Vedder River that morning, and now the Captain was at the barbeque, about to insert the block of sockeye salmon that Graham had passed over the fence. It was a beautiful specimen, which Graham had cleaned, filleted and scaled...
That's it -- this month's topic! Scale factors when inserting blocks!
Once upon a time, a long time ago, when the world was flat (or at least AutoCAD's world was still only 2D), drawing scale was totally different from what it is today. In fact, there was no such thing as drawing scale per se. Everything was drawn full size, and a unit was whatever you chose it to be, whether inches, or millimeters, or furlongs, or fathoms, or whatever. In order to make things plot correctly, we had to make appropriate adjustments to text sizes, dimension scale factors, linetype scale factors and hatch pattern scales.
Subsequent releases have added such features as paper space layouts, trans-spatial dimensioning and Imperial vs metric template files. The latter case determines the settings of the MeasureInit and Measurement system variables, which in turn control whether AutoCAD uses Imperial or metric hatch pattern and linetype files.
Most of the time these features greatly simplify our work, but there are a couple of gnarly bits that can creep in and make block insertions more difficult.
Let's start with the simplest case, wherein a block definition was created within an older drawing, and you want to place another insertion of it within the same drawing. No problem; simply launch the Insert command, select a suitable block name from the drop list, pick an insertion point and away you go. One drawing unit in the block definition equals one drawing unit in the main drawing, so the block is inserted at full size.
The Insert dialog box also lets you specify X, Y and/or Z scale factors. This can be useful in reducing the number of block definitions required. For example, a single 1-unit by 1-unit block can be used to represent a large selection of desk sizes. Simply apply appropriate scale factors such as 24X36, 30X50 and so on. This works, but the new dynamic blocks are a much better way of doing this in the current releases.
Of Mountains and Mole Hills
Current releases of AutoCAD now include the ability to specify units and to scale things accordingly when the units are different. Although it may seem to be a little strange at first, this can even apply within a single drawing. I'll explain why later, but meanwhile let's see an example.
Start a new drawing that uses Imperial units. Normally you accomplish this by using the ACAD.DWT template file, but if you're not sure how your templates are set up, then start a new blank drawing using Imperial units. Unfortunately, there are about five ways to do this, depending on your AutoCAD release and how you have configured your startup options.
Anyway, one drawing unit is now one inch. To verify this, start the Units command (Format / Units) and observe the current setting of the Units to scale inserted content: scroll list.
The Units command now includes the Insertion Scale option.
Draw a simple shape and apply a dimension to it.
A simple shape, ready to be converted to a block definition.
Now use the Block command (Draw / Block / Make) to create a block called Mountain. (Before you object to the fact that my mountain is only 4" tall, don't overlook the fact that I might be using this in a model railroad layout.)
When the Block Definition dialog box appears, select a suitable insertion point and the objects for your block. While you are here, confirm that the Block unit: drop list specifies Inches.
Confirm that your new block definition specifies Inches in the Block unit: drop list.
When you've finished defining the Mountain block, you can insert a couple of instances of it into the current drawing. A quick check with the Distance command reveals that each insertion is full size, which in my example means 4" tall. On the other hand, if you do indeed want to make a mountain out of a molehill, then you could manually scale an insertion by a factor of 12,000.
Now draw a vertical line 25.4 units long, with a lower end that starts even with the base of your Mountain block insertion. As expected, this line is considerably longer than the height of the mountain because it's 25.4" long, as compared to the mountain's height of 4.
Start the Units command again. When the dialog box appears, click the down arrow to the right of the Units to scale inserted content: (see the first figure) and select Millimeters from the scroll list. You have now converted the drawing so that one drawing unit equals one millimeter, and the vertical line is now 25.4 millimeters long even though it has not actually changed size. It's still considerably longer than the height of the mountain insertion, which is now effectively 4 millimeters tall.
Ah, but here comes the magic part. Insert another instance of Mountain and it automatically ends up 4 times taller than the length of the line, or 101.60 millimeters. This occurs because within the block definition the mountain is 4 units tall and each unit is 1 inch, but AutoCAD is smart enough to know that it's being inserted into a millimeter drawing and there are 25.4 millimeters to an inch, so it scales the insertion accordingly.
The dimension attached to the mountain still shows 4.00, however, because it's part of the original block definition and was also scaled, so it shows 4.00". The image below shows the net result of our operations after turning on alternate units mode in the dimensioning style.
Left to right: an inch-units block inserted into an inch drawing, a line in a millimeter drawing, and the same inch block inserted into the millimeter drawing.
And so we finally come to the explanation of why we would want different units within the same drawing. The explanation is actually quite simple: we don't always create the block definitions within the host drawing.
There are two kinds of block definitions that are not created within the host drawing: First, we can Insert any existing drawing file from disk, or we can xref (externally reference) an existing file, or or we can drag and drop from any existing drawing using the Design Center (well, I guess it's three kinds), or we can place an insertion from a tool palette (four kinds), or we can cut-and-paste from another open drawing (five kinds), or we can drag-and-drop from component manufacturers' Web pages -- okay, six kinds, but who's counting?
In any case, the block definition retains the units it was assigned when it was created, and the size of any insertions of it is determined by the units of the host drawing. That's why the units of the host drawing are referred to as the Units to scale inserted content.
Balancing Your Scales
For example, you might be working on a map drawing based on kilometers, having been given the block definitions as shown below.
Three different blocks, each created using different units.
Working from left to right, the Mountain units might be meters, the Fish units might be inches and the Ladder units might be feet. As we insert these blocks into our map, AutoCAD automatically scales the Mountain, it will scale the Fish and it will scale the Ladder (hey, it's a fish ladder) to suit our map units.
Actually, it's even more clever than that. If you want a second mountain to be twice as high and specify accordingly during the Insert operation, then AutoCAD applies its units conversion before it applies your manual specification, so the second insertion is indeed twice the size of previous ones, which have already been scaled to compensate for units differences.
The Gnarly Bits
Older drawings and block definitions were all unitless, so a unitless block almost always inserts into a unitless drawing at a 1:1 scale factor. So far, so good.
Problems can arise when a unitless block is inserted into a specified-unit drawing, or vice-versa. Well, they're not so much problems as they are situations of which you have to understand the ramifications in order to avoid problems. It can appear that the units scaling factors are random, but there is some madness to the method.
Start the Options command (Tools / Options), then select the User Preferences tab. On the left side you can now set default units to be used if either the source or the target, or both, are unitless. For example, you may have created older, unitless drawings assuming 1 unit = 1 inch. You can now effectively retroactively specify units for older drawings and block definitions. That is why I said that inserting a unitless block into a unitless drawing usually comes in at 1:1; this is true if nobody has played with these default values. These values are kept in the system registry, so they apply to all drawings and block definitions on your system.
The other slightly crunchy bit is that there are only 20 allowable pre-defined values for units. This means that you can insert a micron block into a parsec drawing, but there is no provision for inserting a fathom block into a furlong drawing.
There is one final, definitely crunchy bit. At first, units scaling only applied to content inserted through the Design Center. The full-range capability, such as insertions from disk and xrefs as outlined in this article, only apply to AutoCAD 2006 and later. Sorry for any inconvenience.
And Now for Something Completely Different...
The secret to cooking fish is to not overdo it. When done, the meat separates with a fork. Overcook it and the meat turns to mush. Also, the fish should be as fresh as possible. And the secret to getting really good, fresh fish to cook is... to have a brother who lives next door and is a successful fisherman.
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
My ConnectMyDNA Results 21 May, 2013
When Physical Prototypes Aren’t an Option 21 May, 2013
My Perfect Electric Bicycle is a Motorcycle! 21 May, 2013