AutoCAD 2013/2014/2015

Reply
Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 1 of 10 (1,600 Views)
Accepted Solution

Width factor of multiline attribute

1600 Views, 9 Replies
04-28-2013 11:41 PM

I was trying to find out, how to change the width factor of multiline attribute and I failed.

The only way was to change the width factor of texstyle the attribute uses.

Is there a way to override this property for a single attribute? And if not, is there some reason for that?

 

Thanks

*Expert Elite*
Alfred.NESWADBA
Posts: 8,895
Registered: ‎06-29-2007
Message 2 of 10 (1,562 Views)

Re: Width factor of multiline attribute

04-30-2013 12:57 PM in reply to: matus.brlit

Hi,

 

>> And if not, is there some reason for that?

What should happen when running command _ATTSYNC?

 

Personal opinion: If you do individual character formatting within a text (MTEXT) you will end in having a chance to just change the textstyle to update all texts (and that what text-styles are built for, to just change e.g. a font at one position (the style) to have it done for the whole document).

At least I don't like to do individually character-settings/overwrites within an MTEXT as of that reason.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 3 of 10 (1,552 Views)

Re: Width factor of multiline attribute

05-01-2013 01:46 AM in reply to: Alfred.NESWADBA

I think you misunderstood me, I don't want to change width factor of individual characters, I want to change the width factor of the whole text.

The same you can do with single-line attributes, so I'm not worried about ATTSYNC.

Also you can change the width factor of attributes in inserted block using the dialog, but for multiline attributes, the textbox is disabled.

Distinguished Contributor
greg.battin
Posts: 147
Registered: ‎12-10-2010
Message 4 of 10 (1,542 Views)

Re: Width factor of multiline attribute

05-01-2013 07:16 AM in reply to: matus.brlit

Here is what i use to adjust the width of the text box for Mutliline Attributes.

 

Some client title blocks have Multilines Atts that are FIELDS and run over the borders...

 

I wish that there was a way to use a lisp or script where you select the Multiline Attribute and then set the width of the text box. 

Here's the manual way:

 

Use the EDIT ATTRIBUTES dialog box with the ATTEDIT command or ATE alias
MultiLine ATT 1.jpg

 

Click the "ellipsis" button (button with 3 dots next to the Attribute that you want to adjust

 

MultiLine ATT 2.jpg

 

Drag the 2 arrows in the upper right of the text box window to adjust

 

Multiline ATT 3.jpg

Exit out of the dialog box by clicking OK...

Multiline ATT 4.jpg

~Greg

Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 5 of 10 (1,521 Views)

Re: Width factor of multiline attribute

05-01-2013 11:19 PM in reply to: greg.battin

Thanks Greg, but this is not what I am looking for. You can get the same result by inserting linefeed where you want the next line.

Imagine the rectangle, where you have a 2-line attribute. You can't add a new line to reduce the width, because you are also limited by the height of 2 lines.

 

This is how it looks for single-line attributes

 

singleline.PNG

 

I would like to be able to esit the width factor for multi-line attributes, too.

 

multiline.PNG

*Expert Elite*
maxim_k
Posts: 3,675
Registered: ‎07-22-2010
Message 6 of 10 (1,513 Views)

Re: Width factor of multiline attribute

05-02-2013 02:35 AM in reply to: matus.brlit

Hi,

 

Here is a quick rough routine (without error checking), that can help you:

 

(defun c:CH_ATTR_WIDTH ( / new_width atent atent_list)
(setq new_width (getreal "\nEnter new width factor: "))
(setq atent (car (nentsel "\nSelect multiline attribute to change width factor: ")))
(setq atent_list (entget atent))
(setq atent_list (subst (cons 41 new_width) (assoc 41 atent_list) atent_list ))
(entmod atent_list)
(princ)
)

 

 

How it works:

 

Command: CH_ATTR_WIDTH
Enter new width factor: .8
Select multiline attribute to change width factor:
Command:

 

Maxim

Architect
MARSS

MacACAD | MARSS


Mentor
matus.brlit
Posts: 246
Registered: ‎03-11-2008
Message 7 of 10 (1,508 Views)

Re: Width factor of multiline attribute

05-02-2013 02:52 AM in reply to: maxim_k

great solution, thanks Maxim

Distinguished Contributor
greg.battin
Posts: 147
Registered: ‎12-10-2010
Message 8 of 10 (1,491 Views)

Re: Width factor of multiline attribute

05-02-2013 07:05 AM in reply to: matus.brlit

Thanks Greg, but this is not what I am looking for. You can get the same result by inserting linefeed where you want the next line.

Imagine the rectangle, where you have a 2-line attribute. You can't add a new line to reduce the width, because you are also limited by the height of 2 lines.

 

Ah - I see

 

Thanks for clarifying. 

 

Cool solution Maxim_k

 

~Greg

Valued Mentor
mbuonocore
Posts: 389
Registered: ‎01-27-2006
Message 9 of 10 (1,478 Views)

Re: Width factor of multiline attribute

05-02-2013 01:15 PM in reply to: matus.brlit

If I understand the question, you could make a textstyle and set the width factor there.   When you make the attribute, assign it that textstyle.  If you need to change the width factor of all the attributes you can change it globally in the textstyle then do an attribute sync.  If you want to change just one or a few attributes you can do it in the attribute editor under the text option tab.  It worked for me in 2013.

 

Please don't forget the "accept the solution" button if this helps.  Thanks

Valued Mentor
mbuonocore
Posts: 389
Registered: ‎01-27-2006
Message 10 of 10 (1,476 Views)

Re: Width factor of multiline attribute

05-02-2013 01:22 PM in reply to: mbuonocore

My bad, you said multiline attribute, my response works directly for single line attributes.  It also works for multiline att's with an extra step.  You can still have the attribute read the textstyle with the width factor set.  However the width factor is only apparent if the text box is expanded as in the other responses.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube