It's BONUS time again! The Text Bonus Tools.1 May, 1998 By: Lynn Allen
AutoCAD without the wonderful Bonus routines would be a lot less exciting. The Bonus tools fill our AutoCAD days with quick-and-easy routines that make the design process much more enjoyable. Ive had the honor of speaking at several AutoCAD user group meetings this past year, and the Bonus tools are always a big hit. Last month, we discussed the routines that relate to Layersthis month well move on to the Text Tools.
As a reminder, youll need to install the Bonus Tools from the installation CD in order to use them. Refer to last months column for step-by-step instructions on how to get the bonus pulldown menu and toolbars to display.
Just about all of us use text in our drawingssome of us more than others. Well start at the top of the Bonus>Text pulldown menu and work our way down. As I mentioned in the previous column, Id like to give credit to those programmers who gave us these great routines by mentioning their names.
(Credit goes to Bill Kramer and Phil Kreiker)
This command is used to modify existing text by stretching or shrinking it by specifying new start and/or endpoints. Lets review the sequence.
Select Text to stretch/shrink:
Starting Point/<Pick new ending point>: s
Starting Point/<Pick new ending point>:
By default, TEXTFIT will prevent the existing startpoint from prompting you for only an endpoint. You can also change the startpoint of the text by specifying an s as shown above. The text height maintains its original setting.
(Dominic Panholzerformer president of the San Francisco AutoCAD User Group)
Have you ever wanted to place text over existing objects on your drawings and have a nice clean boundary area around the text? The new TEXTMASK LISP routine makes it easy to do exactly that. TEXTMASK uses the new Wipeout object to place a mask that matches the drawing background color over existing objects. The desired text is then placed over this masked area. You have control over how big that masked area is in relation to the text. The new BONUS Help file has a before and after picture that demonstrates this command well.
Enter offset factor relative to text height <0.35>: [This is the additional distance around the text you want the wipeout rectangle to occupy.]
Select Text to MASK...
Select objects: Other corner: 1 found
As you move the text, the wipeout mask should follow. How do you get rid of a wipeout? If you try to erase it, youll find the text will erase as well. Exploding the wipeout rectangle will break the wipeout into individual lines that you can then erase. If you modify the text string and need to update the wipeout, reenter the TEXTMASK command and it will delete the original wipeout and replace it with a new, more accurate one.
This routine has been around for years. It seems to develop a little more each time it lands on yet another Autodesk programmers desk. Id like to credit the original programmers, but I cant recall who they were. Im sure those whove contributed will no doubt send me an email claiming ownership (in fact I encourage it!).
AutoCAD has never really done a good job at making it easy to change the characteristics of many text strings at one time. Hence, the CHTEXT.LISP routine was created by and for the frustrated. The new MTEXT objects makes this task simpler to achieve, since you have the nice word processing features built right into the dialog box. For those of you who still have many drawings containing plain old text strings, youll find this bonus tool quite valuable.
The following text properties can be edited using this command: height, justification, location, rotation, style, text string and width. Lets look at the command:
Change text, Version 2.00, Copyright© 1997 by Autodesk, Inc.
Select annotation objects to change.
Select objects: Other corner: 3 found
3 annotation objects found.
Individual/List/<New rotation angle for all text objects>: 45
In the above example, I selected three text strings and changed all their rotation angles to 45 degrees. Their insertion points and text height remained the same.
The Individual option makes it easy for you to assign different values to each selected text string. It pages through the selection set, highlighting them one by one and prompting for changes.
Unfortunately, if you need to change the text height of several text strings that are part of a paragraph, you might need to realign the text, as the insertion points will remain the same as they were before you modified the text height.
The List option that appears after selecting an initial option displays additional information about the currently assigned values (when selecting more than one object to modify). Most of the time, I found this information pretty much useless.
(Credit goes to Randy Kintzley, Dominic Panholzer, Bill Kramer and Greg Robinson)
This unusual command will take existing text strings (Text or MTEXT) and break them into individual lines and arcs. I must admit, this isnt one of my favorites. The HELP function denotes that you could then assign elevation and thickness. This action can be done on regular text without exploding, so the only advantage I can see lies with MTEXT. Fair warningthis command will make your filled fonts look somewhat strange. TXTEXP doesnt work on attributes.
Select text to be EXPLODED:
Select objects: 1 found
3 text object(s) have been exploded to lines.
The line objects have been placed on layer 0.
Note: This could really affect the size of your drawing!
Arc Aligned Text
(Credit goes to Henry Lee)
This nifty function was written using ARX code (Autodesk Runtime Extension). Many of us have scrounged up a similar routine from outside sources to create text along an arcnow this great functionality is part of the program!
Draw an arc and enter the ARCTEXT command. Well review the different
aspects of the ArcAlignedText dialog box.
Select an Arc or an ArcAlignedText: Select an arc to add new text, select an existing arc aligned text object to edit.
You will find four pulldown menus within this dialog (pulldown menus inside a dialog box?). Many of the options found within the dialog box can also be found in the pulldowns. This dialog contains all the information you need to control the placement, height, value and so on of the text you want to align.
The buttons in the dialog contain commands that can also be found in the Format pulldown menu. The first button across the top of the dialog is used to reverse the order of the text when placed on the arc. The second button controls the Drag Wizard. The Help function indicates that the Drag Wizard affects the way the text reacts when the arc is displaced. I couldnt find any significant difference whether or not I used the Drag wizard (help me out if Im being ignorant here folks!). The next four buttons control the placement of the text on the arc. You can Left justify the text, Right justify the text, Center the text or Fit the text along the entire length of the arc. Fit is the default.
Also, you need to decide if you want the text written along the outside of the arc (the convex side) or the inside of the arc (the concave side). In addition, the two remaining options permit you to have the text written outward from the center of the arc or inward towards the center of the arc. Inward would put the text upside down using the example shown within the dialog.
Selecting a TrueType font will permit you to bold and italicize the text. All fonts accept underlining as an option (but why would you do this when combined with an existing arc?).
Most of the other options are self-explanatory. If you are not using Fit, you can control the character spacing. You also need to indicate how far above or below the arc youd like the text to be written. If you choose Left justified, you can select a displacement from the Left; Right justified expects a displacement from the right and so on.
If you use the File pulldown menu to exit this dialog, rather than the easy OK and Cancel buttons, be aware that Exit to AutoCAD executes a Cancel. Update to AutoCAD saves your input and exits the dialog. I am not sure why you would use the pulldowns rather than the buttons, unless you are getting paid by the mouse click.
I will say that I didnt find the Help information very thorough with this command. I had to do a lot of research to sort out what the various tools did in the ARCTEXT command.
Find and Replace Text
(Bill Kramer, Dominic Panholzer, Randy Kintzley and Greg Robinson)
MTEXT added a nice search and replace facility; this routine essentially permits the same facility on DTEXT. It does not work on MTEXT or attributes.
Next to Find, youll input the text you want to get rid of; next to Replace, youll input the replacement text. You can indicate that you want it to search only for those exact case matches. You can also indicate a global change where you will not be prompted to verify each match it finds.
The last two commands have to do with attributes. Attribute editing in AutoCAD still seems primitive to menot much has changed over the past few releases. These two functions do help some for those of you who have attribute-intensive drawings.
Explode Attributes to Text
If youve ever exploded a block with attributes, youve been very disappointed when the attribute values returned to their original tag name. This awesome bonus tool explodes the block and then turns the attributes into text entities while maintaining their value. The text entities take on the original attribute definitions layer and style.
Global Attribute Edit
(Bill Kramer, Dominic Panholzer, Phil Kreiker, Randy Kintzley and Greg Robinson)
This command globally changes the attribute values of a specified block.
Block name/<select block or attribute>: select the block with the attributes you wish to change
Block: DESK Attribute tag: NAME
New Text: David Bradford
Number of inserts in drawing = 3 Process all of them? <Yes>/No:
Yes will globally change all of the NAME tags to David Bradford. No will ask you to manually select the blocks you wish to change.
I found that, even though this command indicates that I can type in the name of the block I wish to change, it wont accept this name as valid input. I had to manually select the block and the attribute tag I wanted to change.
Thats it for the Text Bonus Tools. Next month, well continue our tour through the rest of these great design treasures!
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 free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!