Default Mtext Justification

Default Mtext Justification

Anonymous
Not applicable
3,723 Views
9 Replies
Message 1 of 10

Default Mtext Justification

Anonymous
Not applicable

I would like to set my Mtext to default to MC justification. Anyone know how to do this?

0 Likes
Accepted solutions (1)
3,724 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable

there is no way to specify a default justification, it will always default to top left unless the Autodesk engineers see fit to give us lowly users that ability.

0 Likes
Message 3 of 10

rkmcswain
Mentor
Mentor
Accepted solution
Do you want to change existing MTEXT in the drawing or change how the Mtext command works?

If the latter, you can create a menu macro for the Ribbon or toolbar, or a lisp routine to accomplish this.

Samples
Menu macro: ^C^C._mtext;\_j;_mc;
Lisp code: (defun c:mt ()(vl-cmdf "._mtext" pause "_j" "_mc"))




R.K. McSwain     | CADpanacea | on twitter
Message 4 of 10

Anonymous
Not applicable

I used the autolisp code you provided and that solves the justification problem. Thanks. Is there a way to do it so i can see what i'm typing on the screen?

0 Likes
Message 5 of 10

nbawden
Advocate
Advocate

@rkmcswain wrote:

Lisp code: (defun c:mt ()(vl-cmdf "._mtext" pause "_j" "_mc"))





This may come in handy

 

Is it possible to add extra code to this lisp to set the line spacing to something other than 1 (e.g. 0.85). I personally prefer to run multi line text with a tighter line spacing.

Message 6 of 10

rkmcswain
Mentor
Mentor

Is it possible to add extra code to this lisp to set the line spacing to something other than 1 (e.g. 0.85).

Sure. Give this a shot.

 

(defun c:mt ()(vl-cmdf "._mtext" pause "_j" "_mc" "_l" "_e" "0.85x"))

 

R.K. McSwain     | CADpanacea | on twitter
Message 7 of 10

nbawden
Advocate
Advocate

@rkmcswain wrote:

Is it possible to add extra code to this lisp to set the line spacing to something other than 1 (e.g. 0.85).

Sure. Give this a shot.

 

(defun c:mt ()(vl-cmdf "._mtext" pause "_j" "_mc" "_l" "_e" "0.85x"))

 


Cheers

0 Likes
Message 8 of 10

srleone
Participant
Participant

This is great!

This will still work if the command is mtext, not _mtext, right? I don't like entering my text on the command line.

Thanks!

0 Likes
Message 9 of 10

pendean
Community Legend
Community Legend

@srleone wrote:

This is great!

This will still work if the command is mtext, not _mtext, right? I don't like entering my text on the command line.

Thanks!


What do you mean please? the LISP once loaded is called by the abbreviation MT.

Or are you just unsure on how to autoload LISP? And you are now literally typing all of that one line code everytime you need it? Explain please.

Message 10 of 10

srleone
Participant
Participant
I am actually using Carlson with IntelliCAD.

I have successfully coded a ribbon button to make middle centered mtext,
but was not able to code my "quick key" (same as an alias) for MC
justification.

And no, I am unfamiliar with LISPs other than that they exist, and that
they are, I think, similar to macros in that they include a sequence of
events.

I would love to just type "T" and get a MC mtext box. Is this what a LISP
can do?
0 Likes