Jump to content

Options for creating linetypes.


Recommended Posts

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
Link to post
Share on other sites
  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    9

  • Ivan006

    8

  • SLW210

    3

  • rkmcswain

    1

Top Posters In This Topic

Posted Images

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:

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites
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?

Link to post
Share on other sites
  • 1 year later...

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.

Link to post
Share on other sites
  • 1 year later...
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 :-\

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.

Link to post
Share on other sites
  • 1 year later...
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?

Link to post
Share on other sites

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?

Link to post
Share on other sites
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

Link to post
Share on other sites
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?

Link to post
Share on other sites
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.

Link to post
Share on other sites

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

Link to post
Share on other sites
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
Link to post
Share on other sites

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).

Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...