What is a Linetype file?

Download Report

Transcript What is a Linetype file?

AC1744 - Linesanity
A Journey from Simple to Complex Linetypes
Sam Lucido
Senior CAD Designer
Haley and Aldrich, Inc.
© 2012 Autodesk
Class Summary
In this class you will learn how to create simple and complex
linetypes. You will also learn techniques to create a compiled
linetype library to use as a company standard. Most
importantly, you’ll be able to bring back value to your employer
and the knowledge to help you excel within your field.
© 2012 Autodesk
Learning Objectives
At the end of this class, you will be able to:

Identify, change and create linetype definitions.

Create custom linetypes using fonts.

Create custom linetypes using shapes.

Compile a complex linetype library using shapes.

Create a linetype tool palette for company standards.
AIR
J
TU
GAS
MYLINES.SHX
C
n
STM
Z
SAN
O
EU
© 2012 Autodesk
Let the Linesanity Begin!
© 2012 Autodesk
What is a Linetype file?
A linetype (LIN) file is simply a text file that contains definitions of many simple and complex
There are two types of linetypes:
linetypes. AutoCAD comes with a number of linetypes which in most cases are fine.
Simple and Complex.
Simple linetypes consist of dashes and
dots only.
Complex linetypes contain dashes and
dots, but also can include text and
shapes.
Linetypes can apply to lines, polylines,
arcs, ellipses, wireframes, and most
objects in AutoCAD.
© 2012 Autodesk
Review of the DASHED linetype
A
.5
-.25
= Alignment (required)
The letter A is the alignment field which specifies the action for pattern alignment
at the ends of individual lines, circles, and arcs.
= Tells AutoCAD to lower the pen and draw a line .5 units
= Tells AutoCAD to raise the pen and move .25 units (a space)
© 2012 Autodesk
Let’s test it out!
© 2012 Autodesk
© 2012 Autodesk
Let’s create our linetype file and our first linetype
named WATERLINE
Let’s open Notepad and save a new file named Mylines.lin.
Type in the sequence as shown in the image to create our first linetype; the water line.
Save the linetype file to our working folder.
© 2012 Autodesk
© 2012 Autodesk
Review of the WATERLINE linetype
A
= Alignment (required)
.5
= Tells AutoCAD to lower the pen and draw a line .5 units
.25
= Tells AutoCAD to raise the pen and move .25 units (a space)
0
= Tells AutoCAD to raise the pen and move .25 units (a space)
© 2012 Autodesk
Back to AutoCAD
© 2012 Autodesk
© 2012 Autodesk
Creating a Complex Linetype with Fonts
We need to first create a new text style in AutoCAD and give it a unique name.
Use the Arial Font, Regular Style, and a 0 height. Very important!
© 2012 Autodesk
A,.5,-.12,["A",LINETYPES,S=.12,R=0,X=-.06,Y=-.06,U=0],-.12
A
= alignment (required)
.5
= tells AutoCAD to draw a line .5 units.
-.12
= tells AutoCAD to place a space .12 units.
[]
= enclose the text string and parameters.
A
= tells AutoCAD what to type for the text.
LINETYPES = the name of the style we will use for the linetype (text).
S
= scale of the font.
R
= sets the rotation of the text to 0, relative to the line.
X
= is the x-offset (shifts the text along the x axis
Y
= is the y-offset (shifts the text along the y axis
U
= upright variable to control the position of the text.
-.12
= tells AutoCAD to place a space .12 units.
© 2012 Autodesk
Using the linetype style
*AIR,Air Flow ----- A ----- A ----- A ----A,.5,-.12,["A",LINETYPES,S=.12,R=0,X=-.06,Y=-.06,U=0],-.12
© 2012 Autodesk
Creating the Air Linetype
© 2012 Autodesk
© 2012 Autodesk
Now let’s add some letters…the easy way
© 2012 Autodesk
Load the 3 new lines
© 2012 Autodesk
© 2012 Autodesk
Can you just copy and paste to add new lines?
We have three linetypes with syntax correct for up to three letters.
Let’s just copy those lines, change the letters, and make 3 more.
© 2012 Autodesk
Back to AutoCAD
© 2012 Autodesk
© 2012 Autodesk
Express Tools Make Linetype Command
Create your geometry in AutoCAD how you would like your linetype to display.
Draw a line 1 unit in length and place a piece of text (A) in the center of the line.
Use DTEXT (NOT MTEXT); LINETYPES style with a .12 height and the MC (Middle
Center) justification for the text.
Simply type the trim command and trim the line around the text. Your image should look
like shown below.
© 2012 Autodesk
The Mkltype Command
© 2012 Autodesk
© 2012 Autodesk
Creating linetypes using the Wingdings font.
© 2012 Autodesk
Making three new linetypes

Create a new text style in AutoCAD named WINGLINES and give it a 0 height
© 2012 Autodesk
We are now going to move to AutoCAD and create the three lines using our text
style and the geometry shown below.
Remember the Wingdings font will produce different characters depending on the
case. For this example we will use the Uppercase letters J, C, and M
© 2012 Autodesk
Making the Winglines
© 2012 Autodesk
© 2012 Autodesk
Let’s take a look at the commands we used
1.
2.
3.
4.
5.
6.
7.
Command: MKLTYPE
Select a ".LIN" file: <C:\AU2012\The Linesanity Project\mylines.lin>:
Enter linetype name: Specify a linetype name SMILE
Linetype description: Specify a linetype description SMILE WITH ME
Starting point for line definition: Specify a starting point (Point 5 below)
Ending point for line definition: Specify an ending point (Point 6 below)
Select objects: Select the two objects from the left to right. Do not select
the last line, it has been placed there for reference only
5
6
J
© 2012 Autodesk
Take a look at the our Linetype file
© 2012 Autodesk
Making Shapes
© 2012 Autodesk
© 2012 Autodesk
We just created 3 shapes
We named the shapes SOLIDCIRCLE, SOLIDBOX and
SOLIDARROW.
Check your folder to see if the shapes have been created
and compiled (shp and shx).
© 2012 Autodesk
Creating the geometry with shapes
Draw a line in AutoCAD 1 unit in length.
Insert the shape into the middle of each line.
Break the line (.12) on each side of the shape to create the gap from the shape
to the line. You don’t have to be exact but this creates a more uniform line.
We are not going to use the end line but we need that point for reference when
creating the line.
© 2012 Autodesk
Lines with Shapes
© 2012 Autodesk
© 2012 Autodesk
Make the Linetypes
1.
2.
3.
4.
5.
6.
7.
Command: MKLTYPE
Select a ".LIN" file: <C:\AU2012\The Linesanity Project\mylines.lin>:
Enter linetype name: Specify a linetype name TRI-LINE
Linetype description: Specify a linetype description LINE WITH ARROW
Starting point for line definition: Specify a starting point (Point 1 below)
Ending point for line definition: Specify an ending point (Point 2 below)
Select objects: Select the two objects from the left to right.
© 2012 Autodesk
Our Three Linetypes
© 2012 Autodesk
Create lines with multiple shapes: Ditch
The first line we will create is the DITCH line. Select the same linetype file we
have been using; the MYLINE.LIN file. Remember, AutoCAD will append
this linetype file and place any new lines at the end.
This image will show how to create the line and capture the shapes
© 2012 Autodesk
Create lines with multiple shapes: Wood barrier
Just like the ditch line we will now create the wood barrier line.
© 2012 Autodesk
Create lines with multiple shapes: Waste Limits
The Waste limits line is a unique situation were we just have shapes and no
lines. Notice the red and green lines as shown.
© 2012 Autodesk
Multiple Shapes
© 2012 Autodesk
© 2012 Autodesk
All lines done! Let’s create a shape library
Start with the first shape and create
a shape file named Myshapes.shp
Do the same for the solidcircle and
the solidsqaure, each time
appending the Myshapes.shp file but
keeping the names consistent.
You will now end up with one shape
file containing all your shapes.
© 2012 Autodesk
The Shape file
Notice the *1 before the shape
name. That indicates the
SOLIDCIRCLE is the first shape in
the file.
Notice how the solid arrow has a *2.
You can create shapes separately,
then add to the end of your line
using any text editor.
© 2012 Autodesk
Let’s compile our shapes
Type Compile at the command prompt
Select the Myshapes.shp file.
AutoCAD will compile the myshapes file and create a compact
compiled file with an shx extension. This will be the only file needed to
be placed in the AutoCAD search path.
© 2012 Autodesk
Modifying the linetype file
Open up the Mylines.lin file and replace any sections that contain the path.
© 2012 Autodesk
Tool Palettes
For this demonstration we are simply going to create a
new palette from our existing palettes.
Right-click in the empty area in the palette and select
New Palette.
Now that we have a blank new palette we will rename
that palette to My Linetypes by right clicking on the
name and typing in our New Name.
In the hand out there is a section on how to use the
action recorder and tool palette path to make the
standardization of palettes very easy.
© 2012 Autodesk
Adding the linetype command to our Palette
We need to get a command in there so
we can build. We can use the cui but
let’s make it easy and just draw a line or
a circle in our drawing.
Then right click and drag that object over
to the tool palette. You now have a
command in there that we can begin to
edit.
© 2012 Autodesk
Tool Palettes
© 2012 Autodesk
© 2012 Autodesk
Image, Name and Description
1. The image. This can be done through the standard cui button images or you
can simply take a screen shot (as I have done) of your linetype and place in
a folder to reference.
2. Type in the name of your linetype.
3. Enter a description for the linetype. It is very important to inform the user of
how this linetype is to be used or what it is used for. Do not just ignore this
section.
© 2012 Autodesk
The Command String
4. This is the command string that we will use to enter our linetype. We will
go over that in detail on the next slide.
5. The layer we would like the linetype to be placed on. Create a layer (in
your current drawing) and select this from the pull down. It will now be
created each time you use the linetype
© 2012 Autodesk
© 2012 Autodesk
Linesanity in Action
© 2012 Autodesk
© 2012 Autodesk
You did it!
Now it’s time to build the tool palette for your company
standard.
Simply copy and paste the command string changing the
name of the linetype each time.
Create your own image and place on the palette.
Remember those images will be saved under the tool
palette path system variable.
© 2012 Autodesk
Autodesk University Session Feedback
Session feedback is very important to Autodesk
 Attendees can complete the session survey on their
mobile device, PC, or at a survey station.
 Each
completed session survey enters you in that
days drawing for a free AU 2013 pass!
 You
can help make AU 2013 better!
ALSO: Complete the AU Conference Survey at a survey station and
receive an AU 2012 T-Shirt.
© 2012 Autodesk
Thank you!
Sam Lucido
Senior CAD Designer
Haley & Aldrich, Inc.
www.haleyaldrich.com
www.cadprotips.com
Autodesk, AutoCAD* [*if/when mentioned in the pertinent material, followed by an alphabetical list of all other trademarks mentioned in the material] are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product and
services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document. © 2012 Autodesk, Inc. All rights reserved.
© 2012 Autodesk