Cadtales Complex Linetypes
by Jim Rogers, CADreps Fun with Complex Linetypes was the working title for this
lesson. To the novice or the un-trained AutoCAD user complex
linetypes are a bit confusing and probably not fun. To help
you understand and benefit from complex linetypes we’ll
break down the simple but cryptic code for creating these
useful objects so your drawings can present clear and
comprehensive information with these symbolic lines.
A stands for A-type alignment, The line command will automatically repeat the above pattern to fill the space between the two points picked on the screen by the operator and, add the beginning line segment to the end to form a completed line.
Figure 2 shows two companion linetypes for comparison. Note
that Hidden (.5x) and Hidden (2x) differ from the original
line type only in the length of the line and space segments.
These linetypes are “pre-scaled” to accommodate a range of
common scale factors (1/16”, 1/8” and 1/4”) quickly and
without changing related drawing properties.
The English translation for this linetype sequence is:
A is for A-type alignment, Simple Customizations - Creating a custom linetype is easy.
Open the acad.lin file with Notepad. Copy an existing
linetype to the clipboard (Ctrl+C), scroll down to the User
Defined section and paste the copy into the list. Change the
name and description in the first line, then, change the
line and space instructions in the second line to provide
the desired pattern. (Be sure you have an Enter key at the
end of each line). Save the file and Load the new linetype.
In the event of an error in the new, or any other linetype,
the Load function will give you an error message and list
the linetype name, the type of error and the line number in
the file.
Figure 4 lists the instructions for these linetypes and Figure 5 shows the lines as created in AutoCAD.
Complex Linetypes with Text - The Hot_Water_Supply and Gas_Line linetypes are two examples that utilize text to add information and convey meaning to a line and, save time by avoiding other labeling methods. See Figure 6 for the linetype instructions and Figure 7 for the lines as created in AutoCAD.
Follow the instructions in the Simple Customizations section above to create simple linetypes with text. Change the name & description and substitute your own letter(s) into the “HW” or “GAS” text string, keeping the letter count the same and retaining the quotation marks. Complex linetypes with text contain two essential elements: 1) Line & space descriptors and, 2) A Text Style reference with height & offset transform. The “complex” part of the linetype description is contained within the square brackets, i.e. [“GAS”,STANDARD,S=.1,R=0,X=-.1,Y=-.05]. Where: [ ] Brackets enclose the string, stylename, and transform Note: The -.25 parameter (following the brackets) is the
area between the dashes and spaces reserved for the text.
The only difference between the HW and GAS instructions in
Figure 7 are the ending text-space numbers, -.2 vs. -.25,
allowing for more, or less, letters. Each element in the
instruction set is separated by a comma and there are no
spaces. And, remember – each line must end with an Enter
key.
Model Space: Lines will appear normal in a nominal drawing,
Paperspace: Lines will appear normal in all drawings and will plot correctly. For visibility in Model Space, the ltscale system variable
can be set manually to match the relative scale at which the
drawing will be viewed and printed in paper space. For a
drawing scale of 1/8” = 1’-0” use an ltscale factor of 96.
(There are 96 1/8’s of an inch in a foot). For a drawing
scale of 1/4” = 1’-0” use an ltscale factor of 48. Other
drawing scaling factors can be calculated in the same
manner. In later versions of AutoCAD the plotting routine
will ignore the ltscale setting and plot the lines normally.
CELTSCALE is the Current Object Scale (system variable)
value controls the linetype scale for new objects. The
celtscale value is a scaling factor applied to the current
ltscale value. The default setting is 1. 0 = No special linetype scaling. Linetype dash lengths are based on the drawing units of the space (model or paper) in which the objects were created and scaled by the global LTSCALE factor. 1 = Viewport scaling governs linetype scaling. If TILEMODE is set to 0, dash lengths are based on paper space drawing units, even for objects in model space. In this mode, viewports can have varying magnifications, yet display linetypes identically. For a specific linetype, the dash lengths of a line in a viewport are the same as the dash lengths of a line in paper space. You can still control the dash lengths with ltscale. When you change PSLTSCALE or use a command such as
ZOOM with psltscale set to 1, objects in viewports are not
automatically regenerated with the new linetype scale. Use
the REGEN or REGENALL command to update the linetype scales
in each viewport. Create a custom linetype named SANDBAG. When creating complex linetypes use the “S” transform to assign the actual text height (text height in the Text Style set to “0”). The linetype transform values for S=(text height) and Y=(y-offset) are used to vertically position the text in the line. The “X” transform can be used to shift the text left (-) or right (+). To center the text vertically Y should equal S/2. 1. In AutoCAD, create a new Text Style: LTtxt. a. Use the txt.shx font and set the text height to zero. b. Accept the defaults for all the other settings. 2. Enter ltscale on the command line and set the value to 1. Notes: a) Syntax: No spaces inside the lines; Enter at the
end of each line.
Now change ltscale to 2. The line should change. If the text
disappears extend the line to reveal the text again.
Do you see a productivity and quality benefit in using
Complex Linetypes in your design and drafting environment?
Call your Hagerman sales representative about software
upgrades, training and customization. |