[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.
Create Custom Linetype
Tip# 3011 By Ron Perez On 03-Sep-2008
Rated By 5 users Downloaded : 7029
Categories : Linear Objects, 2D Operations
Software type : AutoCAD 2008
Rename File To : makelt2.lsp
AutoLISP routine automates the steps needed to make a custom linetype with embedded characters.

Editor's Note: In June 2010, this tip was updated and the LISP file was replaced with a new version. Updates include:

  • User can specify text height
  • Gap that the text is placed in is more accurate, vertically and horizontally
  • Text in linetype uses the current textstyle (getvar 'textstyle)
  • Assembled linetype definition is printed to the Command line
  • Variables dashlen, txtgap, txthgt can be modified in code for user preference
  • The rountine checks for existing linetype and prompts user to redefine.

This month’s top tip by Ron Perez is Create Custom Linetype, which automates the steps needed to make a custom linetype with embedded characters. Load the LISP code and type MakeLT to start it. You will be asked to supply a string to be embedded in the linetype. Type in the characters and select Enter. A temporary linetype file definition is created and loaded into the current drawing. All you need to do now is relate it to a layer name, and it is ready to go. This is a nice timesaver for those who make custom linetypes, and it’s well deserving of this month’s top tip prize!


Average Rating:

User comments
Comment by webmaster@cadalyst.com
Posted on 2008-09-03 00:25:07
Hot Tip Harry's Top Tip for September 2008.
Comment by S,MK
Posted on 2008-10-17 12:34:21
Good very simple to use.
Comment by McCaugherty,Dennis
Posted on 2009-04-21 11:25:51
This is great, and would be terreffic if it returned the assembled text line, in the text area, to facilitate adding it to the line definition file, ACAD.lin, if it's still called by that name.
Comment by sak,john
Posted on 2009-05-03 20:19:49
Good Thx!

Log In