CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6940
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 13139:

   
Question CAD 
 %  platform  category 
Q - question

How to insert a new line into multiline text in the Find/Replace command?

A - answer If you want to replace a string in your paragraph text in your AutoCAD DWG drawing (MText) with a new string containing the new paragraph (new line) control character, you cannot use the standard control string for a new line (carriage return, CRLF, new paragraph) - "\P".

However, you can add line breaks using the Unicode control character - \U+000A. So, for example, you can change the drawing text:

thisline

to:

new
line

Using the search string:

this

and replacing it with the string:

new\U+000A

Remember that line breaks added in this way may subsequently behave differently than normal AutoCAD paragraph breaks.

In the full version of AutoCAD, you can also use replacement utilities such as srxText from Arkance Systems to do this.

ACADACLT
100% *  CAD 
21.11.2021    20338×  
Prices - CAD eShop:
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 13749:How to add the SEARCH/REPLACE command into AutoCAD Web?
Tip 13522:LookupXLS - populating DWG texts from Excel spreadsheets.
Tip 12803:How to add double line-spacing to AutoCAD paragraphs?
Tip 12432:Parse/replace Inventor iProperties using regular expressions.
Tip 9265:RENAME on steroids - complex renaming of AutoCAD objects.


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist