AutoCAD Tip - Ensuring Text elements default to Centre Justification

Marketing
Marketing
  • Updated

By Dennis Collin

AutoCAD_Tip_-_Ensuring_Text_elements_default_to_Centre_Justification_-_1.PNG

AutoCAD ‘s text entities when placed, tend to be positioned with a left or top left justification. Quite often it is required to have the text justified to middle centre or right centre.

The AutoCAD system variable Justifytext is rather annoyingly read only, however with the use of command macros in the CUI, Palettes or Toolbars, override behaviour can be set.

AutoCAD_Tip_-_Ensuring_Text_elements_default_to_Centre_Justification_-_2.PNG

In this post I have created a custom tool palette with some command shortcuts pasted into a custom tab. This can be done by dragging a text / Mtext entity onto a blank tool palette.

Once copied, right click the icon and edit the command string macro, like the image below.

AutoCAD_Tip_-_Ensuring_Text_elements_default_to_Centre_Justification_-_3.PNG

N.B. Multi-line text and single line text have slightly different macros due to the dialogue nature of the Mtext editor.

For single line text, enter the following as a command string:

^C^C_.dtext;_j;_mc;

For Multi-line text, enter the following as a command string:

^C^C_.mtext;\_j;_mc;

The double ^C character simulates the pressing of the escape key, cancelling any potential previous command, with letters for command options and semi colon symbols for return key presses. The back slash symbol is used when waiting for user input mouse clicks. This is necessary for when the user clicks on screen to locate the bounding box of a multi-line text object.

A similar technique can be used for the commands in the Ribbon menu as well. These kind of tricks and issues are often discussed in Cadline’s Intermediate AutoCAD Courses and Bespoke AutoCAD Workshops.

For more details on training courses call one of the team on 01784 419922 or visit www.cadlinetraining.co.uk

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.