[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Label Entity with Break
Tip# 4328 By Kent Cooper On 29-Jun-2014
5
Rated By 1 users Downloaded : 395
Categories : Linear Objects, Curved Objects, 2D Editing, Single-Line Text
Software type : AutoCAD 2015
Rename File To : LabelTextTrim.LSP
Break an entity to insert a text string.

Kent Cooper used Cadalyst CAD Tip No. 4212, “Add Text to Piping Drawings” by Theresa Lowe, as inspiration for this routine. Kent’s tip allows you to insert a text string “into” an entity; the entity is broken and the text string is placed into the break. The gap in the entity is sized to accommodate the text string, taking into account the text properties that can change the size of the gap needed. (If you would like to use a wipeout to mask the entity instead of breaking it, see Kent’s alternate routine, “Label Entity with Mask.”)

After you load the LISP file, run the command LTT, then enter the string that you want to add. At this point you can select the drawing entity, but you have the option to change the text style, height, width, and layer before selecting the entity. Subsequent executions of the command in the same drawing will default to the last used text string. Note that entities on locked layers cannot be broken; neither can certain entity types such as text, mtext, or regions.

 

Average Rating:
5


User comments