CADTutor: The best free help for AutoCAD on the web

Michael BeallMichael’s Corner #63
March 2008

Just Call 'Em “Tenured”

by Michael Beall

Fields are relatively new to AutoCAD, but this month I also cover three other commands that have some tenure in AutoCAD. From a dusty bin on your tool bench, the Global Attribute Edit routine can be really useful when working with attributed blocks. And once upon a time, when dialog boxes were in their infancy, just about every procedure was command line-driven… and occasionally they creep back into our daily grind and need to be put back in their place. Cmddia and Filedia, specifically. And finally, one of my favorites, the powerfully functional utility of tiling the drawings so you can copy objects from one drawing to another in a snap.

I hope these insights bump your productivity a bit today so you can have a few more minutes with your family or favorite activity.

RSS FeedAs always, if you would like to be notified when Michael's Corner is posted each month, just subscribe to our mailing list and we'll be sure to let you know when this critter comes online. There's well over 2,000 of you now and it is an honor to be looked upon as a resource for your AutoCAD well-being. You can also keep in touch using the RSS feed. If you would like to contact me directly, you can do that also.

Blessings to one and all,
Michael

Global Attribute Edit (aka Gatte)

As many of you know, the contract furniture industry is - essentially - my customer base. Consequently, the drawings I encounter are full of attributed blocks; some with visible tags, some without. In my occasional coverage of the Block Attribute Manager [October 2006 and August 2007], you will see that Battman addresses the attribute related elements of the block definition, and to a lesser extent, the elements of the block references throughout the drawing (see May 2003 for the specifics on those block terms).

However, when you need to change the attribute value of several blocks at once - globally or by way of a selection set - the Global Attribute Edit command (GATTE) is a wonderful tool. Curiously, Gatte can only be accessed as a keyboard command (which naturally begs to be added to a toolbar or a button on a palette). It has been around for many years, dating back to one of the original Bonus routines in Release 14, I believe.

You can use Gatte to change the value of any attribute tag in an attributed block. In the following example, I'm using it to change the tag for several selected worksurfaces.

Instructions to Change the Values of a Visible Attribute

  1. Type GATTE, then press [Enter] and you see the following prompt:
    Select block or attribute [Block name]:
  2. Select the attribute tag of the block and you see the following prompt:
    Enter new text:

Note: If you click on something other than that block's attribute (or if there is no visible tag), you will see a list of the known tag names for that block. In this example I have selected an attributed furniture block available from the CAP Designer program (see www.2020technologies.com for more information on this program).

Known tag names for block: CAPGC CAPTG CAPDH CAPQT CAPMC CAPMG CAPPN Select attribute or type attribute name:

At this point, you can either enter the tag name for which you want to change the value, or click on the attribute if you missed it the first time.

  1. Enter the new text for the attribute value, then press [Enter]. After entering the new text, AutoCAD will tell you how many of those blocks are in the drawing, and give you an option to change all of them. If you say No, you are given the prompt to Select Objects, as shown in the first illustration where I have selected three worksurfaces for the attribute change. The second illustration shows the changes on those worksurfaces only.

Enter new text: FS_60x30
Number of inserts in drawing = 266 Process all of them? [Yes/No] <Yes>:
N
Select objects:

Please wait...
3 attributes changed.

Before and after changing attributes

Top of page

Power Tool

Custom Button #5: Plot stamp Field on a Palette

I have the most wonderful customers. My friends at Yum! Brands in Louisville came up with this idea so I wanted to pass it along. Some of you may have drawings that you just need to plot from Model Space. To save yourself the trouble of remembering what the drawing name is after it's plotted, add a Filename field to the drawing before you print it! [See July 2005 and August 2005 to learn the fundamentals of Fields.]

Field dialogue box

To review, the four things you can put on a tool palette are Blocks, Commands, Hatches, and Macros. The Filename field doesn't fall under any of those headings… but you can turn it into a Block. To that end, it's important that you add the Filename field to a dedicated block source file since blocks on a palette are "linked" to the drawing from which they came. For specifics on the importance of the source file, see March 2006, Basics.

Instructions to Add a Filename Field to the Tool Palette

  1. Begin a new drawing and name it. This will serve as the source file for the block. I'll name mine CT_March08_Source.DWG.

Note: The field text is displayed in the current text style and will be added to the current layer, so make the necessary arrangements.

  1. Click InsertField, then from the list of field names, click Filename. Make the desired selection for the Format - I'm leaving mine in the default format of (none) - then click OK.
  2. To adjust the field height before you place it, enter H for the Height option and enter the desired height for the text. If the field position is difficult to control, you probably have Ortho on. Turn it off, then click to place the Filename field.

By default fields have gray backgrounds so you can visually distinguish them in a drawing. I would recommend you leave them that way, but if you would rather disable that background feature, you can do so in OptionsUser Preferences under Fields.

Drawing path
  1. Launch the Block command and create a block from the Filename field. For the name, I'm using Field_Filename_MS to distinguish it from a block I may want for Paper Space applications.
  2. After making the block, save the drawing.
  3. Open the Tool Palette window and open the desired palette for the block.
  4. Click on the filename block, the click and drag it onto the palette.
  5. If you think you'll need to be rotating it so it reads vertically in certain drawings, right-click on the block on the palette, then click Properties. Set the property of Prompt For Rotation to "Yes", then click OK.
  6. To test it, open any drawing, then click the block on the palette, move into the drawing, then click to place it!

My thanks to Dan and Beth for this great idea!

Top of page

The Odd Spot

CMDDIA vs. FILEDIA

This doesn't happen very often, but occasionally I hear from people regarding dialog boxes not opening when you expect them to. There are two variables that relate to dialog boxes: CMDDIA and FILEDIA. Both of these need to be set to <1>. If the Filedia variable is set to <0> and you launch the Save command, you will need to enter the desired path and filename at the command line.

Command: save
Save drawing as <C:\ATG\CADTutor\CT_March08_Source.dwg>:

Although the Express tool (A2006 & A2007) of Lman, the Layer Manager, has been phased out in deference to the Layer States Manager beginning in AutoCAD 2008, if you still have those versions and the Layer Manager dialog box is not opening, then you’ll want to set the Cmddia variable to <1>.

Top of page

The Basics

Tile Vertically

When you have objects in drawing A that you would like to get into drawing B, there are a number of ways by which you can accomplish that, but one of the really fun ways is to just drag 'em.

Tiled drawings

A few months back (September 2007, Power Tool) I covered how to copy objects from one drawing to another using Copy with Basepoint, but the method illustrated this month can be used if you just need to get the objects into the other drawing quickly and easily.

Note: The following procedure will only work if you have NOT minimized a drawing. If you want to cycle between open drawings, use Ctrl + Tab. This retains their maximized condition which will enables the drawing to be tiled.

Instructions to Drag Objects between Tiled Drawings

  1. Open one of your drawings, then open a new, blank drawing.
  2. Click WindowTile Vertically. This will split the drawing environment to display the two drawings.
  3. Select some objects in your drawing. If you have selected less than 100 objects, you will see their grips (see OptionsSelection under Grips).
  4. To drag the selected objects into the other drawing, click on a highlighted line of the selected objects (NOT in a grip), then drag it into the other drawing, and release.
Copied objects

Top of page

Left Field

De name of Denim - Although Levi Straus made 'em famous by making the durable jeans for the 1849 California gold miners, the word "denim" comes from "de Nimes", Nimes being the town the fabric was originally produced

Share this page:

Share at Facebook Submit a link at Reddit Share at StumbleUpon Share at del.icio.us Share at Technorati

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence