Explore parallel universes1 Feb, 2001 By: Bill Fane
These are the voyages of the CADship Learning Curve. Its ongoing mission: to explore new AutoCAD commands, to seek out strange new techniques, to boldly go where the AutoCAD user has never gone before. Captain's log (rtos (getvar "date")) = "2451861.8650." The Federation has received reports of some interesting dimension behavior in the Vports sector. We have been sent to investigate.
Captain! I received a distress call from Alan Thorn at a remote outpost in the Vancouver Island region of the Canadian quadrant. His dimensions won't size themselves properly!
Away Team, prepare to beam down. Meanwhile, I'll review the historical logs for any information that might help.
Long, long ago, when Captain LearnCurve first used AutoCAD, the AutoCAD world was flat. There was only one known universe, and all drawing was done in that universe. It was model space, but we didn't call it that. In fact, we didn't call it anything.
In a reverse of traditional paper-and-pencil techniques, we drew all objects full size. We decided on a plot scale and performed a series of size calculations before we could add any text and dimensions or insert the border and title block. We scaled the text, dimensions, and border to fit the object.
When it came time to plot the drawing, we set the scale again. Sometimes two wrongs do make a right, and we hoped that everything would come out correctly.
And then came paper spacea delightfully simple theory. You continue to draw the object full size in model space, while all documentation is done in paper space. You should always create all text and dimensions at the desired final size and plot the paper space layout 1:1. No more scaling problems.
Away Team reporting, Captain. We have passed over to the parallel universe, but now can't see the other one!
No problem. While we are in paper space, the Vports command cuts a hole through to model space. Figure 1 shows a typical setup. The white rectangle is the sheet of paper, and the dashed border indicates the limits of the printable area for the selected plotter or printer. The red rectangle indicates the viewport window cut through to model space, where the black part outline lives. It's often standard practice to put the window frames on a unique layer and then freeze the layer to hide the frames.
It is a one-way window from paper space to model spacemodel space cannot see back into paper space.
Actually, it's about a one-and-a-half-way window. Not only can you see through it, but object snaps can reach through and touch objects in model space. You can't actually touch the objects themselvesfor example, you can't do a diameter dimension to a circlebut you can create a linear dimension in paper space that snaps to the ends of a line or the quad points of a circle.
The bad news is that such dimensions are not associative changing the size of the model space object does not change its paper space dimension. Let's see if there is some way we can put the dimensions in model space while all other documentation stays in paper space.
With the Viewport command activated, you can now click on the button at the right end of the status bar to toggle back and forth between model space and paper space. It appears that you're in paper space because you still see the "paper" layout, but now the cursor moves only within the model space viewport. You can zoom and pan to your heart's content until the drawing nicely fits the layout sheet. This effectively reverts to the good old days of scaling the object rather than the paper.
To make this even better, while in model space you can issue the Zoom command and reply with a specific value, such as 0.5xp. Note the two letters at the end. They tell AutoCAD to zoom in model space to a ratio such that when we revert to paper space, the model space scale will be 0.5:1 (or 1:2) times paper space. It now becomes almost trivial to set up a scale drawing.
The really bad news is that if you now apply dimensions in paper space, the measured distance they report is multiplied by the zoom ratio between model space and paper space. You can overcome this by playing with a bunch of dimension variables, but then you are back to dimensioning in paper space.
But wait! There's even worse news! The zoom ratio and hence the effective plot scale can get messed up. If anyone zooms or pans in model space by reaching through the viewport in paper space, everything is out of whack again.
My brain hurts. I think I'll forget paper space and go back to my old model space methods.
Away Team reporting again, Captain. We finally have some good news. We seem to have found two fascinating force fields that are able to control those errant dimensions.
First, the good news. Issue the Ddim command from the Format pull-down menu (Data menu in Release 13), pick either the Fit or Geometry option (depending on release), and select the Scale to paper space option.
Now activate the model space viewport via the button on the Status bar. Set the zoom ratio, then begin dimensioning. Magic! The dimension is in model space so it measures the model and is associative to it, but the size of dimension text, arrowheads, and gaps are suitably scaled so it looks right from paper space.
The really good news is that AutoCAD 2000 lets us lock the zoom ratio between paper space and each model space viewport. Simply set the zoom ratio, then return to paper space. Pick the viewport boundary, then Modify, then Properties. Look down near the bottom of the dialog box under Misc. and change Display Lock from No to Yes.
Now when you pan and zoom in the model space viewport, paper space zooms and pans with it so the ratio and alignment remain constant. The bad news is that this works only for rectangular viewports, not for the new polygonal ones in AutoCAD 2000.
Set the laser printer to stun
In figure 2, I created two viewports at different zoom scales to show an enlarged detail of the small notch. I locked the zoom ratios and froze the viewport boundary layer.
Next, I defined text and dimension styles to the height that I wanted them to be when plotted. I also set the dimension style to Scale to paper space. This is critical to making things work.
I clicked on the status bar button to enter model space, clicked inside the bigger viewport region to make it current, and applied the appropriate dimensions.
Then I clicked in the detail viewport region to make it current and applied the dimensions on a different "detail dimensions" layer so I could freeze them in the main viewport. I didn't have to change any dimension style settings, because everything scaled automatically.
I can now print the paper space layout at a 1:1 plot scale, regardless of my viewport scales.
Figure 3 shows the results of a quick trip into tiled model space. To get there, click on the Model tab at the bottom of the layout screen in AutoCAD 2000, or on the Tile button in the Release 13 and 14 status bar. Note the different dimension scales.
Also note the sequence we followed. The dimension style must be Scale to paper space, the viewport scales must be set before you apply dimensions, and the dimensions must be applied in model space through the paper space viewports.
And now for something completely different
Don't tuck your pant cuffs into your boots when you use a chain saw. If you do, saw discharge that blows downward onto your feet will fill your boots with sawdust.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist 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!