Jump to content

Mtext Paragraph Alignment


dnovember99

Recommended Posts

i have been searching for months for something that would help me out with this. i am looking for something that will work with MTEXT. when i search for justification it seems to change where the "TAB" is located. (right, left, top left, top right, bottom right, bottom left, ETC.)

 

but in order to get the text within the MTEXT to align to the left or to the right you have to double click to open the text editor and then select all and change the paragraph alignment. attached in the justify lisp that i found a while ago that will just change the location of the tab. if you run this lisp in AutoCAD you will see what i mean. i hope that this make sense.

2018-06-19 08_10_50-Autodesk AutoCAD 2016 - [J__Phoenix_Programs_Sprouts_1750003893 Sprouts Farm.png

2018-06-19 08_20_04-Greenshot image editor.png

justify.lsp

Link to comment
Share on other sites

You're most likely having the problem you are because of those buttons. They hardcode ( "\\pxq*,textstring" ) the justification into the textstring. Do a search for 'stripmtext' on the interwebs and that will cleanup the mess.

Link to comment
Share on other sites

I would always strongly advise against the use of formatting applied through the MText Editor (as it results in MText formatting codes embedded in the text content), but if you wish to specifically wish to apply such formatting through the use of a program, the program will merely need to update the MText content with the following formatting codes:

       "abc"  ; -> Standard
"\\pxql;abc"  ; -> Left   Justified
"\\pxqc;abc"  ; -> Center Justified
"\\pxqr;abc"  ; -> Right  Justified
"\\pxqj;abc"  ; ->        Justified
"\\pxqd;abc"  ; -> Distributed

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...