Jump to content

To create linetypes


jdbond

Recommended Posts

Hello,

 

I'm a fairly new AutoCAD user (AutoCAD 2007 version) so there's probably a very simple answer to this. I dont know how to create linetype. example for linetype as attachments. I hope someone will help me. sorry for bad english.

Drawing1.dwg

Link to comment
Share on other sites

Type LA in the command bar or go to Format - Layer. Create new layer using colours , lineweights, continuous , dashed etc.

Link to comment
Share on other sites

Sorry gazza_au not quite right linetypes with "X" one method is to add linetypes with text to a .LIN file then use LINETYPE to load them, have a look at acad.lin its a text file. pretty sure some one will have one that matches your "X" request I know there was ----->---- recently.

 

*GAS_MAIN_EXISTING,Existing Gas main - - -G- - -G- - -G- - -G- - -
A,5.08,-5.08,5.08,-5.08,["G",STANDARD,S=1.8,R=0.0,X=-1.8,Y=-.9],-3
*ELECTRICITY_UCONDUIT2,Electricity conduit ----E----E----E----E----E----E--
A,20,-5.08,["E",STANDARD,S=1.8,R=180.0,X=0.0,Y=.9],-3
*PARKING_METER_CONDUIT,Parking meter ----PM----PM----PM----PM----PM----PM--
A,40,-5.08,["PM",STANDARD,S=1.8,R=0.0,X=-1.8,Y=-.9],-3

Link to comment
Share on other sites

Fair enough BIGAL, I never opened his drawing but he should be able to do whatever he needs from layer Properties manager.

Link to comment
Share on other sites

Creating Custom AutoCAD Linetypes

 

 

Adding to the Existing acad.lin File

 

The first method consists of adding the definition of your custom linetype to your acad.lin file. To find the location of this file, at the command line, type (findfile acad.lin). The acad.lin file is where the definitions of many of the default linetypes reside. Let’s take a look at one of the existing definitions to see how they work.

 

*BORDER,Border __ __ . __ __ . __ __ . __ __ . __ __ .

A,.5,-.25,.5,-.25,0,-.25

 

Every linetype definition consists of two lines of text. The first line consists of a standard asterisk, the linetype name, and a description including a text preview of the linetype. The second line is where it starts to get tricky. First we have a standard letter A to specify the alignment type (always A in AutoCAD linetypes), then a series of values to define the actual pattern. Positive values represent a line of that length, negative values represent a space of that length, and zeroes represent periods. Below you can see how these values relate to the actual linetype.20130108AutoCADCustomLinetypes02.pngLinetypes with text become a bit more complicated by including a portion specific to the text in brackets. This bracket portion defines the linetype text, text style, text size, rotation angle, horizontal offset, and vertical offset.

 

*HOT_WATER_SUPPLY,Hot water supply ---- HW ---- HW ---- HW ----

A,.5,-.2,["HW",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.2

 

The most difficult part about this is determining the horizontal and vertical offsets, but even those are not too hard to figure out by experimenting and giving your linetype a few test runs. Choose a text style that exists in all of your drawings, such as the Standard text style. Make sure the text height for that style is set to 0 in the drawing so that the text height is controlled by the height setting in the linetype (s=.1) and the LTSCALE, rather than a static value.

At the bottom of the acad.lin file is space to add your own custom linetype. Compose your own, and save the file. If done correctly, you should now be able to load this file using the LINETYPE command. Load your new custom linetype, and you’re done!

Custom AutoCAD Linetypes with Express Tools

 

The second method of linetype creation doesn’t require you to create your own linetype definition in the acad.lin file, but does require AutoCAD Express Tools to be installed. On the Express Tools tab of the Ribbon, expand the Tools panel to find the Make Linetype and Make Shape buttons.

20130108AutoCADCustomLinetypes04.pngThe advantage to using the Express Tools method is that it allows you to easily create shapes and incorporate these into your linetypes. Draft your shape, and then use the Make Shape tool to create a .shp file for it. Use the SHAPE command to insert your shape into your drawing, and draft the pattern of your linetype.20130108AutoCADCustomLinetypes05.pngNow, use the Make Linetype tool to create your linetype based on this pattern. It will prompt you for a location for the new .lin file and the linetype’s name and description. When it asks for the starting and ending points for the line definition, specify the region that will be repeating throughout the linetype.20130108AutoCADCustomLinetypes06.pngSelect the objects that compose your linetype, and ta da! You have your own custom linetype incorporating a custom shape.20130108AutoCADCustomLinetypes07.pngIn order for linetypes using shapes to work properly, both the .lin and .shp need to be in a Support File Search Path, such as the location of your acad.lin file.

Link to comment
Share on other sites

Jdbond, please check if this is what you were looking for:

*JDBONDXLINE,---x----x----x----x---
A,.5,.01,["x",STANDARD,s=.1,r=0,x=-.1,y=-.033],.01

Link to comment
Share on other sites

First, I’m going to create a simple one. I draw one line, and one single line text as shown below.

----X----X----X----X

 

I’m going to convert those object in to a custom linetype.

 

  1. Access from ribbon or AutoCAD Menu: Express>Tools>Make Linetype. Or if you are a command line fans, you can type MKLTYPE.
  2. Type you line type file name, then click save. This file name is what you’ll see when you load the .lin file in windows dialog box.
  3. Type your linetype name, then press [enter]. This line type name is what you’ll see in the name list.
  4. Type your line type description (optional), then press [enter]. This description should be able to give you a brief description about this line type.
  5. Specify starting point and end point. In this example, I choose left end point of the line as start point. And somewhere slightly on the right of the text.
  6. Select objects. Select them both, then press [enter].

Link to comment
Share on other sites

Gazza

Type LA in the command bar or go to Format - Layer. Create new layer using colours , lineweights, continuous , dashed etc.

 

The point I was making here is that yes there is make linetype methods but they were not via the method as you posted. Same as there is hatch generator programs out there as well or old fashioned hard coding or someone has already created what you want . Your time spent explaining how to use makelinetype will be very handy as its a pretty common request here and I have added the post to a index I keep for others.

Edited by BIGAL
Link to comment
Share on other sites

BIGAL,

I got the wrong end of the stick but posted some helpfull answers after. :surrender:

 

 

Enter this in command line.

 

(startapp "notepad" (findfile "acad.lin"))

Link to comment
Share on other sites

Msasu :x is too small. how to change X to be larger. thanks for helping.
Change where it says S=.1 and test.

If you modify the size, will need to adjust the vertical displacement accordingly; it may be required to work on their spacing size, too.

*JDBONDXLINE,---x----x----x----x---
A,[color=blue]1.7[/color],.01,["x",STANDARD,[color=red]s=.35[/color],r=0,x=-.1,[color=orange]y=-.13[/color]],.01

However, it may be easier to play with item's linetype scale in Properties.

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...