-->
header image

Collection of AutoLisp for Text Entities - Lisp Help


Under text category, you can rotate, change the angle or align texts with respect to selected text or parallel to the line. Also, you can change case and justification of text.

Text Commands


Sl. No. Command

Description

1 RT Rotate text with respect to angle of points selected
2 ALT Align texts with respect to selected text
3 PTX Arrange text around a line
4 ALP Align selected texts parallel to selected line
5 CCA Change text case (Initial Capital/Capital/Small)
6 CJ Change text Justification
7 RTC To change angle of text to read conveniently
1. ROTATE TEXT WITH RESPECT TO ANGLE OF SELECTED POINT (RT)

Menu: Rotate Text with Respect to Angle of Selected Point (RT)

Functionality: To rotate the selected text parallel to the selected points.

Description: Many a time it is necessary to rotate text entities in a drawing with respect to some angle. Use the Rotate command in CAD, texts can be rotated. But, by using rotate command rotating multiple texts do not give the desired result, because the rotation of all the texts is done with respect to a single base point. Use ‘RT’ command to rotate the texts in drawing as per your requirements.

Procedure:

1. Type ‘RT’ at the command prompt.
2. Select Entities: Select the text entities which are to be rotated.
3. Pick the first point for rotation angle: Select the first point to determine the angle.
4. Pick the second point for rotation angle: Select the second point to determine the angle.

Text RT Lisp
 Rotate text with respect to angle of selected points (RT)

2. ALIGN TEXTS WITH RESPECT TO SELECTED TEXT (ALT)

Menu: Align texts with respect to selected text (ALT)

Functionality: To align texts with reference to selected text at specified distance.

Description: In CAD, texts cannot be aligned Left, Right or Center to any reference text automatically. Often aligning texts with respect to a reference text is not easy in CAD, since in CAD there are no justification tools as in word or Excel. Only using Mtext you can justify the texts, but using MText is not the preferred entity type for many reasons. Using ‘ALT’ command it is possible to arrange text with different justifications.

Procedure:

1. Type ‘Alt’ at the command prompt.
2. Type your choice <Left/Right/<Centre>>: Type the alignment type for example, type L for left. [Note: Left -Text will be left aligned with respect to the reference text.]
3. Pick the reference text entity: Select the reference text entity which you use to align the text.
4. Type the distance between the text's <0 for standard >: Type the distance between the selected text and the next text. By default, the system calculates 1.75 times Height of the selected text when you press enter key, but you can specify a distance for better results.
5. Pick the next text: Keep selecting next text till you are done with alignment.

Text RT Lisp
 Align texts with respect to selected text (ALT)

3. ARRANGE TEXT AROUND A LINE (PTX)

Menu: Arrange Text around a line (PTX)

Functionality: To align selected texts perpendicular to selected lines.

Description: In alignment drawings, once an alignment is fixed and their respective levels are interpolated along the alignment, most of the texts representing the elevations will not be perpendicular to the cross section lines. Using ‘PTX’ command, texts around a line can be rotated perpendicularly, which intern increases the readability of the drawing.

Procedure:
1. Type ‘PTX’ at the command prompt.
2. Type the box width: Type a value (box width) which will decide how far from line text is to be selected.
3. Pick the reference line: Select the lines which are to be taken as reference for arranging texts.
Text RT Lisp
 Arrange Text around a line (PTX)

4. ALIGN SELECTED TEXT PARALLEL TO SELECTED LINE (ALP)

Menu: Align Selected Text Parallel to Selected Line (ALP)

Functionality: To align selected texts parallel to selected line with reference to selected text.

Description: Often in many survey drawings, the texts are not aligned properly as shown in the drawing below. Aligning these texts increases the readability of the drawing. However, aligning individual texts take a lot of time in CAD; hence use the ALP command which rotates and aligns the text in just one step.

Procedure:
1. Type ‘ALP’ at the command prompt.
2. Pick the reference line: Select the reference line.
3. Pick the reference text entity: Select the reference text for the distance from the line.
4. Select entities: Pick remaining text entities to align.
Text RT Lisp
  Align Selected Text Parallel to Selected Line (ALP)

5. CHANGE TEXT CASE (INITIAL CAPITAL / CAPITAL / SMALL) (CCA)

Menu:Change text case (Initial Capital / Capital / Small) (CCA)

Functionality: To change the case of text to either to Initial Capital, Capital or Small.

Description: CAD Packages are not word editors; there will still be a lot of texts within CAD drawings. As many versions of CAD Packages does not offer features like changing the case of selected text, the ‘CCA’ command can be used to change the cases of selected text entities to either capital, small or title case.

Procedure:
1. Type ‘CCA’ at the command prompt.
2. Initial Capital/Capital/Small: Type your option (I for Initial Capital / C for Uppercase / S for Lower Case.)
3. Select Entities: Select the texts to change case.

Text RT Lisp
                                             Change text case (Initial Capital / Capital / Small) (CCA)

6. CHANGE TEXT JUSTIFICATION (CJ)

Menu:Change Text Justification (CJ)

Functionality: To change the justification of selected text to specified text justification.

Description: Text justification plays a key role in aligning the text with respect to other entities in the drawing. In CAD there are 12 Text Justifications, which itself indicates the importance of text justification. In CAD, text justification can be changed using the “Properties” command OR type the command MO in the command prompt. Using the MO command justification can be changed, Still, CJ can be handy as selecting texts in this command is easy when compared to the modify properties command.

Procedure:
1. Type ‘CJ’ at the command prompt.
2. Select text to change justification: Select the text objects to change the justification.
3. Select Justification – [L C R BL BC BR ML MC MR TL TC TR]: Enter your choice.

Text RT Lisp
L – Left BL – Bottom Left ML – Middle Left TL – Top Left
C – Centre BC – Bottom Centre MC – Middle Centre TC – Top Centre
R – Right BR – Bottom Right MR – Middle Right TR – Top Right

7. CHANGE ANGLE OF TEXT TO CONVENIENTLY READ IT (RTC)

Menu: Change angle of text to conveniently read it (RTC)

Functionality: To make the selected texts conveniently readable.

Description: When the drawing is printed without rotating, it is easy to read any text having an angle between 0 to 90 degrees or Above 270 degrees. While working with drawings it is quite common that you rotate some texts and hence sometimes without our knowledge text will be placed in a way where it will not be convenient to read. Using ‘RTC’ command, all the texts in the drawing can be rotated in a way that it becomes readable easily without changing its position.

Procedure:
1. Type ‘RTC’ at the command prompt.
2. SelectEntities: Select the text objects that are to be made readable.

Text RT Lisp