-->
header image

Collection of AutoLisp for Text Modification - Lisp Help



Under Text Value Modification, you can interchange text; create new text and copy reference text to all other selected text. Also, you can divide, increment, add special value, concatenate and finally insert the sequential numbers to text.

Text value modification commands

Sl. No.

Command

Description

1 ITX Interchange the texts
2 ADT Create new text using content of the selected texts
3 CPT Copy Text of reference text to all other selected text
4 DVT Divide text into subtexts
5 SQN Insert Sequential numbers
6 INR Increment available texts
7 ADV Add specific Value to all the selected texts
8 APT Concatenate Prefix/Suffix to available texts
9 RND To round-off elevations to 0.005 precision
10 TMT To trim around selected texts
1. INTER-CHANGE TEXTS (ITX)

Menu: Inter-change Texts (ITX)

Functionality: To interchange text content between selected texts.

Description: When working with drawing, it is often required that you have to interchange the texts i.e. to copy the content of one text to another. Normally to interchange the text in CAD you have to move the text positions OR Copy and Paste the content of one text to another and vice versa. But, by using the ITX command interchanging the text content between two texts is just a one step process.

Procedure:
1. Type ‘ITX’ at the command prompt.
2. Select Entities: Pick the text objects for which contents have to be interchanged.

Text Value Modify ITX Lisp
                                                            Inter-change Texts (ITX)

2. CREATE NEW TEXT USING CONTENT OF SELECTED TEXTS (ADT)

Menu: Create new Text using content of selected Texts (ADT)

Functionality: To create a new single text using text content of the selected texts.

Description: Many times content of one text is created as two different texts. For example “12th Main Oxford Layout” would have been created in the drawing as different 3 texts, as in, the first text would be “12th Main”, the second would be “Oxford” and the third would be “Layout”. Making it as a single text has its own advantage in further editing. Like Moving or Rotating and all other drawings, editing becomes easy. To merge such scattered text ‘ADT’ command can be used.

Procedure:
1. Type ‘ADT’ at the command prompt.
2. Pick the reference text entity: Pick the text entity that is to be taken as reference.
3. You want < New text / Erase >: Type N, if you want to select one more text along with the reference text or type E, to erase the text.
4. Pick the next entity: Select text entities that are to be added. When done, click ‘enter’ to complete text modification.
5. Pick the insertion point: Pick the insertion point to place new text (Only in the case of ‘Next text’ option).

Text Value Modify ITX Lisp
                                   Create new Text using content of selected Texts (ADT)

3. COPY REFERENCE TEXT TO ALL SELECTED TEXTS (CPT)

Menu: Copy Reference Text to all selected Texts (CPT)

Functionality: To copy text as in reference text to all other selected texts.

Description: Find and Replace option is available in CAD. But, while working on some of the drawings it may required that you have to replace a set of texts with another text. For Example, in a drawing, you may have ground levels in one layer and a constant formation in another layer, such that both these texts have the same insertion point. For such requirements use ‘CPT’ command.

Procedure:
1. Type ‘CPT’ at the command prompt. 2. Pick the reference text: Select the text that acts as a reference text. 3. Select Entities Select the text entities that are to be replaced.

Text Value Modify ITX Lisp
                                      Copy Reference Text to all selected Texts (CPT)

4. DIVIDE THE TEXT INTO SUBTEXTS (DVT)

Menu: Divide the Text into sub Texts (DVT)

Functionality: To divide texts with multiple words as individual texts.

Description: Sometimes to accommodate text in a given area it may be required to divide the text into two different texts. In such cases, the ‘DVT’ command can be used which divides the texts into subtexts. It should be noted that the program divides the text wherever it finds the space in between the words.

Procedure:
1. Type ‘DVT’ at the command prompt.
2. Pick a text: Pick the text objects that are to be divided. It will divide the selected text into multiple texts on the basis of space within the selected text.

Text Value Modify ITX Lisp
                                                  Divide the Text into sub Texts (DVT)


5. INSERT SEQUENTIAL NUMBERS (SQN)

Menu: Insert Sequential numbers (SQN)

Functionality: To insert sequential numbers at selected points.

Description: Marking sequential numbers in CAD is common while giving parcel numbers in layout drawings. Creating parcel numbers in a sequential order in CAD takes a lot of time particularly when there are a lot of numbers. To solve this requirement SQN command can be used, wherein by just selecting points sequential numbers are marked.

Procedure:
1. Type ‘SQN’ at the command prompt.
2. Enter the First number: Enter the lot number.
3. Pick the point to insert a text: Pick a point to insert the lot number.

Text Value Modify ITX Lisp
                                                      Insert Sequential numbers (SQN)

6. UPDATE TEXT VALUES WITH INCREMENTED NUMBERS(INR)

Menu: Update Text values with incremented Numbers(INR)

Functionality: To sequentially increment value of existing texts.

Description: Using the ‘INR’ command it is possible to update the available texts in a Sequence. ‘INR’ command is very similar to the ‘SQN’ command with a small difference, that the ‘SQN’ command is to be used when you insert the sequential number for the first time, whereas ‘INR’ can be used to update the broken link of sequential numbers back to continuous numbers when in-between number is added or deleted. After numbering the parcels in a layout drawing, if a new plot is created or if some plots are removed while redesigning, then all the plot numbers are to be renumbered. In such cases, ‘INR’ command comes handy.

Procedure:
1. Type ‘INR’ at the command prompt.
2. Type the increment: Enter the value to be incremented.
3. Type the first value: Enter the first value.
4. Pick the text for conversion: Pick the remaining texts one by one.

Text Value Modify ITX Lisp
                                    Update Text values with incremented Numbers(INR)

7. ADD SPECIFIED VALUE TO ALL SELECTED TEXTS (ADV)

Menu: Add specified value to all selected Texts (ADV)

Functionality: To add specific value to all the selected texts.

Description: This option is used to add or subtract a numeric value to all the selected texts. Let us say a drawing is generated with a benchmark of 91.468. After creating the entire drawing, if you come to know that the actual benchmark was actually 96.468 and not 91.468, then all the elevations in the drawing have to be added with value 5. In such cases use ‘ADV’ command to add or subtract a specific value from selected texts.

Procedure:
1. Type ‘ADV’ at the command prompt.
2. Select Objects: Select the texts for which you are going to add specific value.
3. Enter the number to be added: Type the number which is to be added. If you wish to deduct the value then specify the negative number.

Text Value Modify ITX Lisp
                                                  Add specified value to all selected Texts (ADV)

8. CONCATENATE PREFIX/SUFFIX TO AVAILABLE TEXTS (APT)

Menu: Concatenate prefix/suffix to available texts (APT)

Functionality: To concatenate (append) a string with the selected text(s).

Description: Concatenating text to available texts is a general requirement in CAD. When there are texts in drawing like ‘Ch 1200’ or ‘Chainage 1230’ and if the alphabet “ M” is to be added to all the texts, then use the ‘APT’ Command and select the ‘Suffix’ option, then specify “ M” and select the texts to be added with this Suffix.

Procedure:
1. Type ‘APT’ at the command prompt.
2. Type the string to be added: Type the string to be concatenated.
3. Before Or After <B/A>: Type B to concatenate the string before the selected string or type A to place after the selected string.
4. Select Entities: Select the text entities for which the new string is to be concatenated.

Text Value Modify ITX Lisp
                                      Concatenate prefix/suffix to available texts (APT)

9. ROUND-OFF ELEVATIONS TO 0.005 PRECISION (RND)

Menu: Round-off Elevations to 0.005 Precision (RND)

Functionality: To round-off elevations to 0.005 precision.

Description: This option is used to round off elevations to 0.005 precision of all the selected texts. Many survey instruments can read values with precision up to 0.005. When editing the drawing or interpolating the elevations may not be rounded off to 0.005. In such cases, selected elevations in the drawing can be rounded to nearest 0.005 using ‘RND’ command.

Procedure:
1. Type ‘RND’ at the command prompt.
2. Select entities: Select elevation texts.

Text Value Modify ITX Lisp
                                      Round-off Elevations to 0.005 Precision (RND)

10.TRIM TEXT (TMT)

Menu: Trim Text (TMT)

Functionality: To trim spaces on either side of the text.

Description: If there are extra unwanted spaces on either side of the text content can be trimmed using ‘TMT’ function. For example, let us suppose that there is a text ‘831.24’ and if you try to create contours with such elevations, contour program will not consider it as valid elevation as there is a space. Using ‘TMT’ function such spaces can be removed.

Procedure:
1. Type ‘TMT’ at the command prompt.
2. Select entities: Select text entities for which spaces to be trimmed.

Text Value Modify ITX Lisp
                                                                    Trim Text (TMT)