Complex linetypes in AutoCAD
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:
INVALID number or bad continuation
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:
Bad definition of (linetype name) at line (line#) of file c:\Acltwin\filename.lin
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.
- Create the text STYLE with a height of zero.
- Define the linetype, using the S= for the text height.
- If you change the text style height, any complex linetype using that style is affected. This will take affect after a REGEN.
- Use the text style exclusively for the complex linetype.
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.
- In AutoCAD, create two text styles. Name them mcstyle and Map.
- Use the txt.shx font, and set the height to zero.
- Accept the defaults for all the other settings.
- Enter ltscale on the command line, and set the value to 1.
- Enter celtscale on the command line, and set the value to 1.
- 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
- Start a new drawing.
- Load the two linetypes using the test.lin file.
- Assign each linetype to a layer.
- Set the LIMITS to 50,50 and Zoom All.
- Draw a line on each layer to view the different line types.
Now change the LTSCALE to 2. The lines should change.
Now try CELTSCALE set to 2 and place a new line on the screen.
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.
*MAP,--- Map ---
where
- *MAP is the name of the linetype
- ---Map---- is the description of the linetype
A,1.0,-0.5,["Map",mcstyle,S=1,R=0,X=0,Y=-0.5],-3.0
where
- A is A-type alignment (see Help for details)
- 1.0 is the length of the dash
- - designates a space
- 0.5 is the amount of space before text
- brackets ([ ]) enclose string, stylename, and transform
- "Map" is the text string
- mcstyle is the text style
- S is the text height for this case, or scale of height set in text style
- R is the rotate, set to zero relative rotation
- X is the xoffset, set to no offset
- Y is the yoffset, set to .5
- -3.0 is the distance between dashes (the area where the text resides)
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 the instructions in the AutoCAD Customization Guide under "Linetype Definition Files."
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.
1 Comments:
Civil Engineering: Complex Linetypes In Autocad >>>>> Download Now
>>>>> Download Full
Civil Engineering: Complex Linetypes In Autocad >>>>> Download LINK
>>>>> Download Now
Civil Engineering: Complex Linetypes In Autocad >>>>> Download Full
>>>>> Download LINK rl
Post a Comment
Subscribe to Post Comments [Atom]
<< Home