Wednesday, March 14, 2007

Multiline attributes in AutoCAD 2008

A great news in AutoCAD 2008 that we have been waiting a long time for is attributes that supports multiple lines.
There is a new mode for "Multiple lines" in the Attribute Definition dialog box that you start with the ATTDEF command. -ATTDEF also supports multiple lines.
After having created a block and you double click on it the EATTEDIT command opens the Enhanced Attribute Editor. As you can see the value cannot be edited directly. You need to click on the button with three dots to open the Multiline Editor. This is also the same for the old command ATTEDIT.


This is how the Multiline Editor look like.

Notice that a multiline attribute (MATT) as opposed to a singleline attribute (SATT) has some more options. A SATT has only the Insert Field option but a MATT is almost like a MTEXT object so you can also select Import Text, AutoCAPS, Combine Paragraphs, set Background Mask, Underline, Overline as well as set the width.
Here you see usage of Background Mask that is only available for MATT's.

There is also a new command for directly editing attributes. ATTIPEDIT displays the In-Place Text Editor without the Text Formatting toolbar and the ruler if you select a single-line attribute and with the Text Formatting toolbar and the ruler if you select a multiple-line attribute.
But wait. There is more. If you set the system variable ATTIPE to 1 you get more options when running ATTIPEDIT. ATTIPE is set to 0 as default for best compatibility with releases prior to AutoCAD 2008. But if you set ATTIPE to 1 ATTIPEDIT displays the full in-place editor with almost all formatting options as you have with MTEXT objects.

When a drawing is saved to AutoCAD 2007 or earlier, a multiple-line attribute is converted to several single-line attributes, one for every line of text in the original multiple-line attribute. The values can be edited. If the drawing file is opened in the current release, these single line attributes are automatically merged back into a multiple-line attribute.
PS. If you really don't want your users to create multiline attributes you can set the system variable ATTMULTI to 0. All kind of attributes can still be viewed and edited though.
CAD Geek KB. To preset attribute options before creating an attribute definition use AFLAGS and add 32 to the value to have it as a MATT.
(setvar "aflags" (logior 32 (getvar "aflags")))

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner