Unicode Equivalent for Line Breaks, is it Possible?

Unicode Equivalent for Line Breaks, is it Possible?

Cory-Dubeau
Enthusiast Enthusiast
18,432 Views
9 Replies
Message 1 of 10

Unicode Equivalent for Line Breaks, is it Possible?

Cory-Dubeau
Enthusiast
Enthusiast

Good evening everyone,

 

This is my first ever question on here, so hopefully this isn't too green!

 

After a good long day of tweaking my new custom title blocks, I decided to automate my title blocks somewhat using fields and certain custom properties- this has been a great time-saver and certainly makes you feel slick when you regen it 😉

 

My question here is I have a an MTEXT field that syncs with my drawing title within the properties box and, as expected, it wraps when the string gets too long per line. No problem.

The trouble is when I have a client address that is shorter, it'd be nice from a formatting point of view to be able to put line breaks in so that the street address is on top, the municipality the second, province, the third and so on. Normally when I edit MTEXT, a simple SHIFT+ENTER works just fine, but I'm editing this field from the Drawing Properties dialog, so the text stays in a single line. The other problem is that my MTEXT is nested into a title block which I thought would make my life easier, but not so much here. Because of this nature, I cannot select the MTEXT without block editing and that.. sort of defeats what I was trying to do (especially if it becomes necessary for each project).

 

I know you can use some short hands to place symbols (*.shx substitutions) for centre-lines, diameters, superscripts and so on (and oddly enough a non-line breaking space), but is there an equivalent that ACAD recognizes for a line-breaking space? I did some digging and apparently windows natively recognizes \U+2424 as a line-break, but ACAD can't render it 😞

If anyone has a neat trick they'd like to share, that'd be great! I'd hate to have to put a number of spaces to force the line break. I also suppose I could live with this if it doesn't work.

Thank you all in advance for taking the time! 🙂


Cory, the curious.

0 Likes
Accepted solutions (1)
18,433 Views
9 Replies
Replies (9)
Message 2 of 10

h_s_walker
Mentor
Mentor

Are you sure it's a multiline attribute? I have a multiline attribute in a block and I cannot edit it in properties it will always bring up the mtext dialog box

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 3 of 10

cadffm
Consultant
Consultant

@h_s_walker 

1. Drawing Properties are not 'Properties Palette', it's DWGPROP

(this topic is about a field inside an mtext , inside a block, linked to dwgprops - wanted feature: Linebreaks)

2. Where you read "Attribut"?

 

Sebastian

Message 4 of 10

pendean
Community Legend
Community Legend
Accepted solution

Wouldn't your wish/desire actually break/interfere with the single entry FIELD being sought? Think about it, FIELD command is like a mirror, no different, it is reading a single entry that is something like

1234 MAIN STREET BIG CITY BIG STATE IMPORTANT COUNTRY

Perhaps you need two or more fields instead in two or more separate DWGPROPS entries like:
1234 MAIN STREET
BIG CITY BIG STATE
IMPORTANT COUNTRY

Then instead of multiline ATTs you use two or more single line ATTs.

TOOTB

Message 5 of 10

Cory-Dubeau
Enthusiast
Enthusiast

Thank you everyone for the quick replies- what a great community! 🙂 

 

I suppose you're right @pendean , there wouldn't be a way to break a referenced string in a field. Mayhap, the best way to do this would be embedding a couple of extra custom drawing attributes to reference in single-line TEXT objects? (I've noticed that strings can only be "wrapped" within the confines of an MTEXT box, but not necessarily broken. 

 

I was hoping for some easy unicode hack to enter into the reference string that would force a line break so that the embedded field within my block syncs up to that selectively, but I can see why that could cause programming issues.

 

I'm happy I asked though- I'm always open to making my drawings more intelligent and parametric wherever possible!  🙂

0 Likes
Message 6 of 10

h_s_walker
Mentor
Mentor

Have you tried using \P? See the image below

 

Capture.JPG

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 7 of 10

Cory-Dubeau
Enthusiast
Enthusiast

Hi @h_s_walker ,

 

I appreciate the help! I gave your text line break character a run, but oddly enough it seems like ACAD automatically breaks this functionality by adding another backslash before it after I've typed it in like my screenshot 😣

 

MText-Qualms.jpg

 

It's really quite puzzling, I wonder if it's a hidden system variable that's "autocorrecting" the text value so I don't accidentally add unintended spaces and whatnot - however, I think we're on to something here 🤔

 

0 Likes
Message 8 of 10

cadffm
Consultant
Consultant

Hi,

I don't like to see the thread popping again and again, so I'll answer now.;D

1. No, it is not possible
2. Best solution, see Pendeans answer - use 2 or 3 rows in your Dwgprops and 2-3 Textlines (= 2-3 fields)

3. It's really quite puzzling
No is not, if you understand that in programs are a user-world and a machine-world.

In DWG/DXF you have "internal control codes" in Strings (TEXT,MTExt aso),
made and manage by the program. \P for a newLine or new paragraph for example.

If you like to write a Text "PowerOn\PowerOff"
AutoCAD would display

PowerOn
PowerOff instead of PowerOn\PowerOff

So autocad takes you seriously! (literary), but has to save your input differently

because \ P already internally as NewLine.
Backslashs are the initial char for following control formats, \P \n and so on.
If you want to have a backslash as Text, Autocad adds a second backslash for "read the next char literary".

O\P => saved as O\\P
otherwise it would appears as
O
P

User input = AutoCAD reading literary your input and translate it to the internal needs for displaying well (for you).

 

Fields are reading the source text literary too

 

 

Sebastian

Message 9 of 10

pendean
Community Legend
Community Legend
There is nothing "hidden" to turn on. FIELD command is just a "mirror", a "parrot", mimics but never alters.
It is reading your / as just that, nothing more.

The "solution" offered is for MTEXT, which is not a FIELD entry. Excellent tip, but irrelevant here for fixing a FIELD entry.

HTH
Message 10 of 10

Cory-Dubeau
Enthusiast
Enthusiast

Hello everyone! Thank you all for your inputs! Since the address is a global value throughout my drawings, I suppose I can simply embed an MTEXT (with the option to control the column widths, effectively cutting my lines (or shift+enter) as I need. I just thought I'd experiment more with fields and project properties to save time and adopt different methods for precious time-savings.

I get it though, since fields cannot be formatted, but merely replicate their inputs (with exceptions, like capitalizing, and whatnot), forcing a line break from a document property to an incompatible object just doesn't seem to jive.

I appreciate all your inputs everyone, thank you for your time. 🙂

0 Likes