Seeking current MText formatting codes

Seeking current MText formatting codes

michellem
Advocate Advocate
867 Views
4 Replies
Message 1 of 5

Seeking current MText formatting codes

michellem
Advocate
Advocate

Hello;

 

For an ongoing project I am going to need a reference for MText and MLeader formatting codes. Unfortunately, a lot of the postings seem to be pretty old and I believe there have been new formatting options in recent Autocad versions. 

 

I am also looking for info on things like character or code that gets put in the MText for things like when the user does "Shift-Enter" (That is, creates a new line but not a new paragraph.) Or new-column character.

 

Can someone point me in the right direction?

 

Here are some of the links I have already found:

Sincerely;

Michelle

 

0 Likes
Accepted solutions (3)
868 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant
Accepted solution

Make some Mtext and include the kinds of formatting you're interested in, and look at the effect in the text content in entity data.  After making some, before drawing anything else, put this in at the command line:

 

(cdr (assoc 1 (entget (entlast))))

 

and you'll see how AutoCAD stores the information, including the formatting characters.  [If it's really long -- over 250 characters -- it will be in (assoc 3) and (assoc 1) entries.]

 

[I happen to know off-hand that the Shift-Enter puts "\n" into the text string, and a new-paragraph Enter [alone] puts in "\\P".]

Kent Cooper, AIA
Message 3 of 5

michellem
Advocate
Advocate

Hello Kent;

 

I'm sorry Kent but my project involves translating the text formatting used in Autocad into the text formatting used in Revit. I am therefore interested in all codes and all possibilities. Your solution essentially involves creating my own documentation of the subject. Naturally, I would prefer to avoid that.

 

Sincerely;

Michelle

0 Likes
Message 4 of 5

ВeekeeCZ
Consultant
Consultant
Accepted solution

I would probably start HERE at theswamp.org, free reg required.

Message 5 of 5

vladimir_michl
Advisor
Advisor
Accepted solution

Thanks for mentioning, the \c codes were added to the tip. Fields are handled in a different way (texts are being interpreted on creation, not stored as some control codes). The %%C or %%D sequences have nothing to do with MText control codes (it is a plain text feature).

 

Vladimir Michl, www.arkance-systems.cz  -  www.cadforum.cz