Untitled Document

AutoCAD 2010 Customization – LINETYPE

by sunithbabu on April 4, 2009

Well time is really ticking away & yet to receive my copy of AutoCAD Inventor Professional 2010 from the ADN portal.,

Before that, I feel you can enjoy my AutoCAD 2007 – 2010 Customization tutorial series,

AutoCAD LINETYPE,

Before we start with the creation of custom line types lets see the various line types
available in AutoCAD

Enter the following command at the command prompt [linetype]

command-entry

Once you do so you should be able to see the following window

linetype-manager

Now select the Load option to see a new window, where you can see variety of line types

load-linetype

All the linetypes are stored in a file called [acad.lin], which is stored in the directory

C:\Documents and Settings\Administrator\Application Data\Autodesk\AutoCAD
2007\R17.0\enu\Support\acad.lin

select-line-type-file

Now open the acad.lin file to see the contents

load-or-reload-linetype

Alternatively you can also open this file acad.lin, in a notepad to see all the contents.
Make sure you don’t select always open with when opening with notepad for the first time

open-with-note-pad

**********

*/ A copy of the file acad.lin is given below for your reference and for those who don’t have
AutoCAD 2007 installed /*
************************************************************************
;;
;; AutoCAD Linetype Definition file
;; Version 3.0
;; Copyright (C) 1991-2006 by Autodesk, Inc. All Rights Reserved.
;;
;; Note: in order to ease migration of this file when upgrading
;; to a future version of AutoCAD, it is recommended that you add
;; your customizations to the User Defined Linetypes section at the
;; end of this file.

;;
*BORDER,Border __ __ . __ __ . __ __ . __ __ . __ __ .
A,.5,-.25,.5,-.25,0,-.25
*BORDER2,Border (.5x) __.__.__.__.__.__.__.__.__.__.__.
A,.25,-.125,.25,-.125,0,-.125
*BORDERX2,Border (2x) ____ ____ . ____ ____ . ___
A,1.0,-.5,1.0,-.5,0,-.5

XXXXXX

A,.0001,-.2,[ZIG,ltypeshp.shx,x=-.2,s=.2],-.4,[ZIG,ltypeshp.shx,r=180,x=.2,s=.2],-.2
;; User Defined Linetypes
;;
;; Add any linetypes that you define to this section of
;; the file to ensure that they migrate properly when
;; upgrading to a future AutoCAD version. If duplicate
;; linetype definitions are found in this file, items
;; in the User Defined Linetypes section take precedence
;; over definitions that appear earlier in the file.
;;

NOTE:
You might have noticed that in the linetype file few details were intentionally made bold
with RED color. This is to help you understand that any new line type created in AutoCAD can
be saved in acad.lin file rather than saving them in a new file. Thereby ensuring easy migration of
the new line types to the next release of AutoCAD.

Now before we start creating the linetypes let’s review some basic information

Linetypes are defined in one or more linetype definition files that have a .lin file extension
When you create a linetype, you must load the linetype before you can use it.
The LIN files included in AutoCAD are acad.lin and acadiso.lin. You can display or print these
text files to better understand how to construct linetypes
LIN files must always be saved in ASCII format and use an .lin file extension

Line Type Definition [THEORY]

Each line type definition occupies two lines in the acad.lin file. The first line generally helps us
in knowing the name of the line and a short description. While the second line gives details about the
coding and format. We shall take a simple line type from acad.lin and see how it goes.
Example A1
*BORDER, Border __ __ . __ __ . __ __ . __ __ . __ __ .
A,.5,-.25,.5,-.25,0,-.25
Based on the above line type we can develop a standard format as shown below
*Linetype Name, A short description
A, Linetype values / Codes / Format
We shall now see the explanation for the above.

1) * – This is Asterisk sign which can be input using SHIFT + 8 on Keyboard
2) Linetype Name – This helps in selecting the corresponding Linetype for creation. Based on
the above linetype the name is BORDER
3) , – This is a comma symbol to separate between Linetype Name and description
4) A short description – This helps in defining the description of the linetype
5) A – This signifies Alignment Field much about this will be dealt separately.
6) Linetype values or codes – These are numbers which shall also be dealt later.
a) Codes with Positive value – will create a line of specified units(codes)
b) Codes with Negative value – will create a gap of specified units(codes)
c) Codes with Zero value (0) – will create a dot “.”

Now Lets consider another linetype to understand better
*DASHDOT,Dash dot __ . __ . __ . __ . __ . __ . __ . __
A,.5,-.25,0,-.25
In the above example the name of the linetype is – DASHDOT
Description is given as Dash dot with the corresponding linetype
A – The alignment field specifies the action for pattern alignment at the ends of individual lines, circles,
and arcs. Currently, AutoCAD supports only A-type alignment, which guarantees that the endpoints of
lines and arcs start and stop with a dash
0.5 – Length of Dash
-0.25 – Length of Space
0 – dot (zero length)
Creating New Linetype [Problem 1]
Now let’s create a new linetype as shown below
Name of Linetype – Dash Dot Dot
_ . .
Note: The values selected is arbitrary only (Example)
Values for the above line are
Length of first Dash is: 0.2 units -
Length of gap is: (- 0.15) units GAP
Length of dot is: 0 units .
Length of gap is: (-0.15) units GAP
Length of dot is: 0 units .
Length of gap is: (-0.15) units GAP
Now the actual linetype patter is given below
*DashDotDot,Dash Dot Dot __ . .
A,0.2,-0.15,0,-0.15,0,-0.15

Based on these values the linetype can be created in two ways, but wait let’s see these in the next post

Related Posts with Thumbnails
  • Venkatesh

    Hi Sunith,

    The site you have developed now is more professional.

    I liked this post on AutoCAD 2010 Customization – LINETYPE,

    Well written, looking forward for other post on AutoCAD Customization.

    Thanks
    Venkatesh

  • Venkatesh

    Hi Sunith,

    The site you have developed now is more professional.

    I liked this post on AutoCAD 2010 Customization – LINETYPE,

    Well written, looking forward for other post on AutoCAD Customization.

    Thanks
    Venkatesh

  • Nirmala

    The AutoCAD Customization – LINETYPE is well written,

    I’m amazed to see the way you have written this article / tutorial.

    Sunith, you are really an excellent writer for Autodesk products., I further saw your linked in connection.

    Congrats for all your success.

  • Nirmala

    The AutoCAD Customization – LINETYPE is well written,

    I’m amazed to see the way you have written this article / tutorial.

    Sunith, you are really an excellent writer for Autodesk products., I further saw your linked in connection.

    Congrats for all your success.

  • Dawid Els

    Want to know more about complex line type. Struggling to get AutoCAD 2009/2010 to recognized the line type defined in the .shx as compiled from .shp

  • Dawid Els

    Want to know more about complex line type. Struggling to get AutoCAD 2009/2010 to recognized the line type defined in the .shx as compiled from .shp

  • Ludvig

    Hi!
    Ive read your article and it was interesting to see how simply one can customize a linetype. However, I am just a beginner and im having trouble actually seeing the linegraphics. For example i tried using the HT line (hot water supply) but as I draw a line with PL i get nothing but a straight line. I tried all other lines aswell but most of them stay as a continuous line. The only one i could see was the dashed line.
    Ive just begun to use CAD and im using the 2010 verison. Thankful for help!
    L

  • Ludvig

    Hi!
    Ive read your article and it was interesting to see how simply one can customize a linetype. However, I am just a beginner and im having trouble actually seeing the linegraphics. For example i tried using the HT line (hot water supply) but as I draw a line with PL i get nothing but a straight line. I tried all other lines aswell but most of them stay as a continuous line. The only one i could see was the dashed line.
    Ive just begun to use CAD and im using the 2010 verison. Thankful for help!
    L

  • sh4m

    i have inquiry about line type manager,i try to make new line type manager but i can't to make it.example::-
    if i load,you can see line type like this..GAS—-GAS—–,if i want to change this word to GST—-GST—–and create new line.can you tell me how?

  • sunithbabu

    Open the GAS line file and replace the GAS by the word you want . . . Let me
    know if this does not work . . .

  • sh4m

    Yes,i try to change area description GAS line to GST or anything line but can't.can you help me how mr.sunithbabu because i'm am just beginner,and use CADD 2008.

  • ishmaelsciberras

    i want to do a line type with number somthing like this:
    ——2——-2——
    can anyone help me how to do it

    thanks
    ish

  • umair

    plz shear me a link where i got autodesk inventor 2010… plz

  • sunithbabu

    search and register at http://students.autodesk.com



Previous post:

Next post: