ReMark Posted September 25, 2008 Share Posted September 25, 2008 (edited) 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 November 30, 2010 by ReMark Quote Link to comment Share on other sites More sharing options...
Dipali Posted September 25, 2008 Share Posted September 25, 2008 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: Quote Link to comment Share on other sites More sharing options...
lpseifert Posted September 25, 2008 Share Posted September 25, 2008 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 Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 25, 2008 Author Share Posted September 25, 2008 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. Quote Link to comment Share on other sites More sharing options...
BOB'27T Posted September 29, 2008 Share Posted September 29, 2008 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? Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 4, 2009 Author Share Posted November 4, 2009 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. Quote Link to comment Share on other sites More sharing options...
ademontis Posted May 25, 2011 Share Posted May 25, 2011 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 :-\ Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 25, 2011 Author Share Posted May 25, 2011 Post a sample drawing with the linetype that you want to extract in it so someone here can test the lisp routine. Thanks. Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 8, 2013 Share Posted March 8, 2013 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? Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 8, 2013 Author Share Posted March 8, 2013 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? Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 8, 2013 Share Posted March 8, 2013 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. Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 8, 2013 Author Share Posted March 8, 2013 One option would be to "borrow" one of AutoCAD's linetypes and edit it to suit your needs. Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 8, 2013 Share Posted March 8, 2013 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? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 8, 2013 Share Posted March 8, 2013 Try this on the command line. (findfile "acad.lin") Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 8, 2013 Share Posted March 8, 2013 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. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 8, 2013 Share Posted March 8, 2013 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 Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 8, 2013 Share Posted March 8, 2013 (edited) 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 March 8, 2013 by Ivan006 Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 9, 2013 Author Share Posted March 9, 2013 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). Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 11, 2013 Share Posted March 11, 2013 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 Quote Link to comment Share on other sites More sharing options...
Ivan006 Posted March 11, 2013 Share Posted March 11, 2013 Thanks SLW210, the PDF helped. I still can't find my standard "acad.lin" file, which is very weird, but I'll keep looking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.