Jump to content
ReMark

Options for creating linetypes.

Recommended Posts

ReMark

How do I create a custom linetype?

 

  • Directly edit AutoCAD’s acad.lin file, or a copy thereof, using any ASCII text editor such as Notepad. You can add a new definition or copy and revise an existing definition.
  • From within AutoCAD type –linetype at the command line followed by for Create. Follow the prompts as they are presented. A new .lin file can be created or AutoCAD’s own acad.lin file can be appended.
  • In full AutoCAD, click on Express, then Tools and select Make Linetype. Follow the prompts as they are presented.
  • Use a LISP routine called MakeLT as featured in Cadalyst magazine, September, 2008 and written by Ron Perez. The code is available at the Cadalyst website www.cadalyst.com. Click on the tab CAD Tips. Search for the routine by name, Create Custom Linetype or by tip number 3011.
  • Buy an aftermarket complex line generating program such as AutoLINE 2009. Available at www.autodsys.com. The software was previewed in the August, 2008 issue of Cadalyst magazine.

BTW: When new linetype definitions are added to acad.lin insert them after the heading User Defined Linetypes to ensure they will migrate successfully when upgrading to a future version of AutoCAD.

 

Note that if you have a duplicate linetype definition residing in the User Defined Linetypes section of the file it will take precedence over a definition found in the beginning of the file. Consider it to be like an override.

 

This link will take you directly to CAD Tips. http://cadtips.cadalyst.com/

The link mentioned above will take you to the homepage of Cadalyst magazine. If you haven’t got this website on your Favorites list you should remedy that oversight immediately.

 

Now, what are you waiting for? Go out and create some custom linetypes and have some fun in the process.

Update 11/30/10

Ron Perez updated his lisp routine, mentioned above, in June of 2010. The new lisp routine is named makelt2.lsp and can be downloaded from the Cadalyst website. It is Tip# 3011.

Edited by ReMark

Share this post


Link to post
Share on other sites
Dipali

I have never created a custom linetype before but your tutorial motivates me to do so. so hopefully i will do it next few days:huh:

Thanks

 

 

PS: you crossedd it, congrates:wink:

Share this post


Link to post
Share on other sites
lpseifert

Here's a cool routine for making linetypes w/text 'on the fly'... compliments of D. Marker

 

IIRC I edited the code to use a text style named SIMPLEX, you need to make a text style with that name or edit the code to use a text style of your choosing (e.g. STANDARD)

LTXT.lsp

Share this post


Link to post
Share on other sites
ReMark

Not exactly a tutorial, per se, but the thanks are appreciated Dipali.

 

And I see that lpseifert has added yet another option. Thanks. That should give questioners a good place to start.

Share this post


Link to post
Share on other sites
BOB'27T
Here's a cool routine for making linetypes w/text 'on the fly'... compliments of D. Marker

 

IIRC I edited the code to use a text style named SIMPLEX, you need to make a text style with that name or edit the code to use a text style of your choosing (e.g. STANDARD)

I loaded this lisp, but when I specify a name and hit enter, the command disappears. What am I missing?

Share this post


Link to post
Share on other sites
ReMark

Credit for this suggestion goes to lpseifert once again.

 

LinOut.lsp - Exports linetype definition (including shape and text info) from an AutoCAD drawing. File sile is 12KB. This LISP routine can be downloaded from:

 

http://www.xanadu.cz/en/download.asp?file=LinOut

 

A handy routine to have when a client or a subcontractor sends you a drawing with a custom linetype in it but neglects to send you the actual linetype definition file. This routine extracts that information for you.

Share this post


Link to post
Share on other sites
ademontis

Hi buddies, i used the Linout but it generates an empty file... or better, it only contains this:

 

; Linetypes exported by LinOut.lsp from C:\DISCO D\P008[1].lin

;

; LINOUT by CAD Studio - www.cadstudio.cz

;

 

but no definition :-\

Share this post


Link to post
Share on other sites
ReMark

Post a sample drawing with the linetype that you want to extract in it so someone here can test the lisp routine. Thanks.

Share this post


Link to post
Share on other sites
Ivan006
Here's a cool routine for making linetypes w/text 'on the fly'... compliments of D. Marker

 

IIRC I edited the code to use a text style named SIMPLEX, you need to make a text style with that name or edit the code to use a text style of your choosing (e.g. STANDARD)

 

I'm trying out this lisp, and it's not working. I'm loading it in AutoCAD 2010, is that why it doesn't work?

Share this post


Link to post
Share on other sites
ReMark

I have no idea why it won't work. I've never tested it either.

 

Can you post an image showing what the linetype you are trying to create looks like?

Share this post


Link to post
Share on other sites
Ivan006
I have no idea why it won't work. I've never tested it either.

 

Can you post an image showing what the linetype you are trying to create looks like?

 

I've drawn it out in cad, but I would prefer to make this a linetype.

GAS LINE.PNG

Share this post


Link to post
Share on other sites
ReMark

One option would be to "borrow" one of AutoCAD's linetypes and edit it to suit your needs.

Share this post


Link to post
Share on other sites
Ivan006
One option would be to "borrow" one of AutoCAD's linetypes and edit it to suit your needs.

 

I would love to "borrow" AutoCAD's linetypes, but I can't seem to find the file on my computer. It's not located in the support file in Autodesk on my computer. I've tried to find the file in windows, but it can't be found. Any ideas?

Share this post


Link to post
Share on other sites
SLW210

Try this on the command line.

 

(findfile "acad.lin")

Share this post


Link to post
Share on other sites
Ivan006
Try this on the command line.

 

(findfile "acad.lin")

 

I see the path, but I can't seem to get access to my 'appdata' folder through explore. I guess I can't get access to the .lin file to "borrow" the code.

Share this post


Link to post
Share on other sites
SLW210

Might be your problem with the LISP then. I guess you could try this one of mine.

 

*NATURAL_GAS,Natural Gas Line ---- NG ---- NG ---- NG ----
A,.5,-.2,["NG",STANDARD,S=.1,U=0.0,X=-0.1,Y=-.05],-.2

Share this post


Link to post
Share on other sites
Ivan006
Might be your problem with the LISP then. I guess you could try this one of mine.

 

*NATURAL_GAS,Natural Gas Line ---- NG ---- NG ---- NG ----
A,.5,-.2,["NG",STANDARD,S=.1,U=0.0,X=-0.1,Y=-.05],-.2

 

Thanks.

 

I tried the code you posted, but I keep getting the message "Invalid number or bad continuation." when I try using AutoCAD to run the code. I've even tried using Notepad to apply your code, but the file is not showing up when I try to load it. Is there something wrong with my CAD or am I entering the code incorrectly? I'm running AutoCAD 2010 MEP.

Edited by Ivan006

Share this post


Link to post
Share on other sites
ReMark

You don't use Notepad to apply a code.

 

Does your custom linetype file end with the extension .LIN? Example: NatGas.lin

 

In the LTYPE dialog box one can use the FIND button to browse to the location of the file on their computer (can be anywhere, even your Desktop) and once found it can then be loaded. Once loaded the linetype can be assigned to a particular layer. There is nothing wrong with your version of AutoCAD 2010 MEP.

 

There should be nothing in Windows Explorer to prevent you from drilling down to the right subfolder to find and edit your acad.lin file (or whatever it is called in MEP).

Share this post


Link to post
Share on other sites
SLW210

Sorry, I posted right as I was leaving work Friday.

 

Take the LineType Definition I posted above and paste into NotePad or similar, "Save As" .lin somewhere in the File Search path or add the path to AutoCAD search path.

 

SEE THIS

 

Here is a PDF I have that has some useful info on long text strings in a line type.

 

 

You may want to look into why you cannot access your folders.

Linetypes.pdf

Share this post


Link to post
Share on other sites
Ivan006

Thanks SLW210, the PDF helped. I still can't find my standard "acad.lin" file, which is very weird, but I'll keep looking.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×