Attaching raster image files as underlays has become quite common in modern CAD departments. In fact, I’ve seen entire sheets of a document set as nothing but attached underlays with the occasional leader or text block alongside them.
There’s an inherent issue with them though: their frames in AutoCAD. A frame is the visual border that shows the extents of the underlay (or its clipped boundary). You may want to see them. Or not. You may want to plot them. Or not. Those decisions may be different depending on what kind of file it is. Or not.
In practice, it can all be confusing, but it can get even more so if you don’t understand how these frames work. First, how does AutoCAD manage them?
Various Frame Variables
Each underlay type has a corresponding AutoCAD System Variable (SysVar) that controls how the frame is managed. Below is a list of the various frame variables (there are a few others, but these deal specifically with underlays).
They all work the same way. They all have three possible values, but the default setting differs depending on type. Here is how they work:
0: The frame is not visible, and it is not plotted. The frame temporarily reappears during selection preview or object selection.
1: Displays and plots the frame.
2: Displays, but does not plot the frame.
I wish I could tell you there was a handy control for adjusting these in either the contextual Ribbon tab or the right-click popup menu, but there isn’t. You’ll have to resort to looking them up (because let’s be honest…you’re not going to remember them), typing them in, then going back to look up the values (see last point).
Master of the Frames in AutoCAD
This brings us to the final piece of the puzzle, and the one that creates the most confusion. There’s also a System Variable called FRAME. And to those that aren’t familiar with the individual frame variables, it seems like a logical place to start.
In fact, most of us first notice it in the Reference panel of the Ribbon’s Insert tab. It nicely displays graphics and descriptions of the three settings.
Sounds easy, right? But this is where the confusion comes in. Remember I said that the individual frame type settings differ by default? That’s why you probably have noticed this Ribbon tool displaying in its default state of *Frames vary.*
Here’s the kicker: This menu item controls the FRAME variable, and it in turn controls all the individual frame variables. In other words, changing FRAME sets all the others to that value.
No wonder this is a source of confusion and questions. Imagine a fairly normal scenario where your drawing has both a DWF and a JPG attached, which have different defaults for their respective Frame variable. You change FRAME via the Ribbon, and now both underlays work the same and may be different than what you intend.
To further the confusion, all these variables are stored in the drawing, so they may all be different from file to file—making things even worse!
If all this sounds like a good place for an enterprising CAD Manager to take over, you’re right. In fact, they don’t need a lot of experience with AutoLISP to make sure your settings are always right. If you’re one of those people, you might check out both Part 1 and Part 2 of our series on Automating your Tasks with AutoLISP.
(Spoiler Alert: Use setvar to set your sysvars in the acaddoc.lsp file. Badda-bing.)
More Tuesday Tips
Check out our whole Tuesday Tips series for ideas on how to make AutoCAD work for you. Do you have any favorite AutoCAD tips? Tell us in the comments!