Académique Documents
Professionnel Documents
Culture Documents
Issue:
This document provides instructions for using text styles in complex linetypes. It discusses the effects of the
LTSCALE and CELTSCALE system variables on the font characters and recommends steps to get the best
results.
Solution:
Complex linetypes are custom linetypes that can contain embedded shapes or text. Before you create
complex linetypes using text, consider how the font settings, scaling, and colors will affect the linetype.
Text style settings
The text height setting will affect the linetype if it is set to a specific height other than zero (0). No other text
style settings will apply, unless multiline text is placed in the drawing using the same text style defined in the
complex linetype. You must use the REGEN command to see the changes.
Note: Use a text editor such as Notepad to create the complex linetype. If you try to create the linetype
within the program, the following error message is displayed:
Before you create a linetype with text in it, define the text style that you will use. Unless the text style used
in the linetype has been defined in the current drawing, the following error message (or similar) is displayed
when you try to load the line:
Note: You will also receive this message if there is not a hard return, or <enter>, placed at the end of the file
that you have created.
If you plan to use the LTSCALE or CELTSCALE command in the drawing, the text will change to the new
size. Unless you follow these rules, it will shift out of alignment with the dashes that you have created.
Scale
The following exercise will demonstrate how to create a complex linetype and change the scale
proportionally.
Exercise
When you create the complex linetype, you will assign the actual text height for the "S" transform. The
linetype transform values S= (text height) and Y= (Y offset) are for centering the characters. If the S=1, then
you will want to offset Y=.5 to center the line.
Tip: You may want to place a line of text with mtext first and use the distance command to check the
character height. Some fonts adhere to standards which may cause the center to be off.
1. In AutoCAD, create two text styles. Name them mcstyle and Map.
2. Use the txt.shx font, and set the height to zero.
3. Accept the defaults for all the other settings.
4. Enter ltscale on the command line, and set the value to 1.
5. Enter celtscale on the command line, and set the value to 1.
6. In a text editor, create a file named test.lin and paste the following text in the file.
*MCSTYLE,--- MC ---
A,1.0,-0.5,["MC",mcstyle,S=1,R=0,X=0,Y=-0.5],-2.0
*MAP,--- Map ---
A,1.0,-0.5,["Map",mcstyle,S=1,R=0,X=0,Y=-0.5],-3.0
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-create-Complex-linetypes.html 2/4
Now try CELTSCALE set to 2 and place a new line on the screen.
8/23/2017 How to create complex linetypes in AutoCAD | AutoCAD | Autodesk Knowledge Network
The dashes stay in proportion to the text and everything will scale together.
Linetype defined
A closer look at the linetype will tell what each part means. Each item is separated by commas.
where
A,1.0,-0.5,["Map",mcstyle,S=1,R=0,X=0,Y=-0.5],-3.0
where
This example will rotate the text relative to whatever way the line is angled and keep the text aligned with
the dashes. To have the text always be horizontally placed on the screen, replace the R=0 with A=0.
Color
The complex linetype must be only one color. It can be set to color bylayer or to any color using Entity
Creation mode. The text is part of the line and not a separate entity. A complex line cannot be exploded.
Shape files
Compiled shape files (SHX files) can be used in complex linetypes. These SHP and SHX files must be
created in the full version of AutoCAD. The location of the SHX file must be set in the support path. Use
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-create-Complex-linetypes.html 3/4
the
instructions in the AutoCAD Customization Guide under "Linetype Definition Files."
8/23/2017 How to create complex linetypes in AutoCAD | AutoCAD | Autodesk Knowledge Network
An AutoCAD drawing that contains such a linetype must be accompanied by the compiled shape file or SHX
file where the shape is defined, as well as the LIN file where the linetype is defined.
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-create-Complex-linetypes.html 4/4