ACAD (2000 Maybe Higher) : Customizing Linetypes
Page 1 of 1
ACAD (2000 Maybe Higher) : Customizing Linetypes
Here's something I found awhile back ago.
CREATING CUSTOM LINETYPES
AutoCAD2000 allows you to define three types of linetypes. Type 1 is a simple combination of lines, dots, and spaces. This type can be created using the Make Linetype tool under the Express Menu. The second type uses a text string and the third type uses a shape.
To create the second and third type, create your custom linetype file using any text editor. My text editor of choice is Notepad. This ensures that no formatting will interfere with my results and Notepad is readily available in any WINDOWS environment.
Open Notepad and save your file as CUSTLT.LIN.
Each line definition is comprised of two lines. The first line must begin with an asterisk, followed by the linetype name and an optional description, in the following format:
*ltname, description
The second line gives the alignment and description followed by the code needed to create the linetype. The linetype code can include a text string, shape descriptor or directions for simulating pen movement (pen up or pen down – a positive number for pen down and a negative number for pen up).
In this tutorial, we’ll create two different linetypes, one incorporating a text string and one using shapes.
This will be for a linetype used to indicate a storm drain and will have the text string SD alternating between a line; i.e. ---- SD ---- SD.
To define this linetype, called SD, enter the following:
*STORMDRAIN,--- SD --- SD
A,.5,-.25,["SD",Standard,y=-.09,s=.2],-.5,.5,-.25,["SD",Standard,y=-.09,s=.2],-.5
In the second line of the definition, the A indicates the alignment, the .5 indicates the pen down to produce the line, the –.25 indicates the pen up to provide a space. To begin the text string definition, use a bracket. The "SD" indicates the text string to be used. Standard is the text style to use. Y indicates the Y offset. S is .2 is the scale for the text height. End the text string definition with a closing bracket. Complete the definition by defining the pen up movement.
This is what the storm drain linetype looks like.
(No picture, I couldn't pasted here, sorry )
Our second linetype requires a shape. This is where most users have problems. Search your directory and make sure that the shx file exists in the path AutoCAD is using. If you create a shape using the Express->Make Shape function, compile the shape into an shx file by typing COMPILE at the command line and selecting the shape file. I use the ltypeshp.shx file that is included with AutoCAD.
To define this linetype, called AIR, enter the following:
*AIR, ---[CIRC]
A,1,-1,[CIRC1,ltypeshp.shx,s=0.5],-1,1,-1,[CIRC1,ltypeshp.shx,s=0.5],-1
The second line defines the line using A for alignment, pen down for 1 units, pen up for 1 units, then a circle using the ltypeshp.shx file with Scale = 0.5, then pen up for 1 units.
This is what the air linetype looks like.
(No picture, I couldn't pasted here, sorry )
Now, save the Notepad file. To load use the LINETYPE, load command, and browse for your Notepad file.
The ltypeshp.shx file has a few different shapes in it. It may take several tries before your linetype looks exactly the way you want it. Experiment with different formats until you get exactly what you want
Hope this helps. ... somewhat
http://www.mediafire.com/?sharekey=96a7cf397c851f5bab1eab3e9fa335cad6545170da506a99
CREATING CUSTOM LINETYPES
AutoCAD2000 allows you to define three types of linetypes. Type 1 is a simple combination of lines, dots, and spaces. This type can be created using the Make Linetype tool under the Express Menu. The second type uses a text string and the third type uses a shape.
To create the second and third type, create your custom linetype file using any text editor. My text editor of choice is Notepad. This ensures that no formatting will interfere with my results and Notepad is readily available in any WINDOWS environment.
Open Notepad and save your file as CUSTLT.LIN.
Each line definition is comprised of two lines. The first line must begin with an asterisk, followed by the linetype name and an optional description, in the following format:
*ltname, description
The second line gives the alignment and description followed by the code needed to create the linetype. The linetype code can include a text string, shape descriptor or directions for simulating pen movement (pen up or pen down – a positive number for pen down and a negative number for pen up).
In this tutorial, we’ll create two different linetypes, one incorporating a text string and one using shapes.
This will be for a linetype used to indicate a storm drain and will have the text string SD alternating between a line; i.e. ---- SD ---- SD.
To define this linetype, called SD, enter the following:
*STORMDRAIN,--- SD --- SD
A,.5,-.25,["SD",Standard,y=-.09,s=.2],-.5,.5,-.25,["SD",Standard,y=-.09,s=.2],-.5
In the second line of the definition, the A indicates the alignment, the .5 indicates the pen down to produce the line, the –.25 indicates the pen up to provide a space. To begin the text string definition, use a bracket. The "SD" indicates the text string to be used. Standard is the text style to use. Y indicates the Y offset. S is .2 is the scale for the text height. End the text string definition with a closing bracket. Complete the definition by defining the pen up movement.
This is what the storm drain linetype looks like.
(No picture, I couldn't pasted here, sorry )
Our second linetype requires a shape. This is where most users have problems. Search your directory and make sure that the shx file exists in the path AutoCAD is using. If you create a shape using the Express->Make Shape function, compile the shape into an shx file by typing COMPILE at the command line and selecting the shape file. I use the ltypeshp.shx file that is included with AutoCAD.
To define this linetype, called AIR, enter the following:
*AIR, ---[CIRC]
A,1,-1,[CIRC1,ltypeshp.shx,s=0.5],-1,1,-1,[CIRC1,ltypeshp.shx,s=0.5],-1
The second line defines the line using A for alignment, pen down for 1 units, pen up for 1 units, then a circle using the ltypeshp.shx file with Scale = 0.5, then pen up for 1 units.
This is what the air linetype looks like.
(No picture, I couldn't pasted here, sorry )
Now, save the Notepad file. To load use the LINETYPE, load command, and browse for your Notepad file.
The ltypeshp.shx file has a few different shapes in it. It may take several tries before your linetype looks exactly the way you want it. Experiment with different formats until you get exactly what you want
Hope this helps. ... somewhat
http://www.mediafire.com/?sharekey=96a7cf397c851f5bab1eab3e9fa335cad6545170da506a99
architech- Admin
- Number of posts : 401
Age : 53
Location : East Coast
Registration date : 2008-11-07
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum