[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.
3D Text
Tip# 2081 By Aaron Werning On 01-Jan-2006
Rated By 5 users Downloaded : 3164
Categories : Manipulation, Create Text, Notes/Text
Software type : AutoCAD 2010
Rename File To : 3DText.lsp
Add depth to a text object so it shows up nicely in a 3D drawing.

WARNING: The red "Download This Tip" button above will not work for this tip; instead, download the ZIP file here.

Update alert: CAD Administrator Aaron Werning updated this routine on February 22, 2010. The header information in the LISP file describes the exact changes that were made. The attached ZIP file now includes the updated LISP file.

The top tip of this month is 3DText (Tip #2081) from Aaron Werning. This fantastic tool adds depth to a text object so it shows up nicely in a 3D drawing. Instead of creating text objects 3DText generates a series of polylines in blocks that trace the text characters and have a z depth. To use this program, load the LSP file and type 3DTEXT at the AutoCAD Command prompt. Press Enter to start the creation of a new 3D text graphic or select an existing 3DText object for edit. You must use the 3DText command to edit the text in the 3D text graphics. Each text sequence is stored as a block and each character is drawn as a block behind the scenes. Documentation on special characters and other aspects of the utility are provided in the header of the LSP file. This version supports only one font type and creating a new font for it may be tedious work unless you write a LISP routine to create the data lists. Congratulations on being the January top tip, Aaron. Nice programming!

Notes from Cadalyst Tip Patrol: Creating 3D text can be difficult — but not with this routine. It will convert existing text into a 3D version, or you can create the text from scratch. Just choose New or Convert when you start the routine, then follow the prompts in the Command line.


Average Rating:

User comments
Comment by Anonymous
Posted on 2010-02-23 05:23:27
Why use this - Bonus tools - explode the text (txtexp), extrude and union - Voila and works with any font!
Comment by rocha,steve
Posted on 2010-02-23 10:01:20
Using TEXTEP is a partial solution and I'm glad you posted the tip. It does not work with all characters when you extrude the string. The number "4" in the true type font Swis721 Blk BT will not complete the extrusion. I would like to see this routine and try it. We place column & equipment tags in our models and the Helvetica font looks best for this use.
Comment by Johnson,Nancy
Posted on 2010-02-23 13:41:42
Apologies for the broken link. We're trying to determine the cause of a bug in the system. In the meantime, will try to attach the file here in the Comments. -Nancy Johnson, Cadalyst
Comment by rocha,steve
Posted on 2010-02-24 08:09:27
Thanks Nancy!
Comment by Werning,Aaron
Posted on 2010-03-03 18:48:03
If you think express tool's "Text Explode" (and then extruding it into 3D) is anything like this routine you obviously don't use 3D text very much. Yes, you can do this for a FEW pieces of text. But if you add more than a few pieces you start adding megabytes to the drawing (when I looked into it it was something like 10 words per MB at a reasonable zoom factor...yuck!). Or if you want to change your text properties at all (i.e. value, height, width, depth, justification, etc.), then you have to delete the thing and start all over. Or if you called the textexp at different zooms it created more or less vertices creating more detailed extrusions (when testing I was able to make a single word add 2 MB to a drawing). All of these inconsistent and time consuming factors is what lead to this routine. Below are the features listed in the .lsp file. Try to do that with the txtexp : ) ; - 3DText.lsp makes a block of every letter (on demand) that is 1 unit ; tall, 1 unit wide and 1 unit deep. When creating the 3D text ; string each letter is inserted with the appropriate X,Y,Z scale. ; This minimizes file size due to extruded blocks. If every letter ; (small and uppercase), special characters & fractions are inserted ; then the file size will only go up by a maximum of 2.5 MB for ; AutoCAD ver. 2000 file format (likely smaller for later versions) ; ; - 3DText.lsp has the ability to convert a DTEXT string into 3D Text ; ; - 3DText.lsp has the ability to edit/modify an existing piece of 3D ; text (i.e text string, justification, width, depth, etc.) ; ; - 3DText.lsp has the ability to fit the 3D text to a curved surface ; such as the face of a verticle cylinder (handy for labeling ; equipment with rounded surfaces such as tanks and vessels) ; ; - % Codes can be used for special characters and fractions: (listed in header of LISP file)

Log In