The hottest question about the customization of li

  • Detail

About the customization of linetype in AutoCAD

the diversity of linetype is one of the characteristics of topographic map drawing. It can be said that mastering the customization and use of linetype in topographic map is equal to mastering all the contents of AutoCAD linetype customization. The administrative boundaries, roads, pipelines, etc. of ground (shape) maps are represented by special linetypes. Although there are few special topographic map linetypes available in AutoCAD, it is not difficult to deal with these special linetypes through the linetype customization function provided by AutoCAD. This paper introduces the customization and use of typical linetypes in topographic maps to help beginners master the customization and use of linetypes in AutoCAD. Here, the lines in the topographic map are divided into two categories: one is lines in the general sense, such as contour lines, paths, transmission lines, Great Wall lines, etc. Although some of these custom lines have complex shapes, they are all classified into the same category, because they are used in the same way, called by the same way, and can also be used by commands such as line and pline, which is "real lines"; The other is the so-called multiline (or multiline) multiline. Multiline is essentially composed of multiple parallel lines. After it is defined, multiple parallel lines of different styles can be drawn at one time by the multiline drawing command mline. Multiline, as a kind of "line", has the advantage of being used as a "line" compared with offset and other commands

first, how to customize various general types

ordinary linetypes can be divided into three categories: simple linetype, shape linetype, and text string linetype

(I). How to and call linetype file

linetype file is based on Lin is a text file with an extension. You can use any ASCII texter, such as Windows Notepad. It is best to save the linetype file in the path of AutoCAD, such as the support subdirectory under the AutoCAD installation directory, so that you can enter the default call path of AutoCAD. Any description can be inserted in the type a text, just add a double semicolon ";;" at the beginning of the line

to call a custom linetype in AutoCAD, just click the file name of the linetype to be entered in the type call dialog box, browse the path, and select to confirm the custom linetype Lin file is enough

(II) how to define simple linetypes such as administrative boundaries

this kind of linetype is composed of repeatedly used dotted lines, spaces and points, such as:

* County boundary (width.2), -.-.-.-.--

a, 2.0, -1.0,0, -1.0

the * sign in the first line is the identifier, marking the beginning of a linetype definition. "County boundary" refers to the line name and width 2 to prompt that the line width is 0.2mm. In AutoCAD 2000, a toolbar for line width selection is added, which is next to the layout selection bar. This is a very useful function. It is convenient to set the width of the drawn line through it, so it is more meaningful to set the width prompt in the type name. The new lineweight setting function in AutoCAD 2000 is only used for printing and inputting synthetic fibers by default. If you want to display it when drawing, including the dynamic fatigue load test from road load data, you need to enter the "format" menu, set "lineweight" and select "display lineweight". At the same time, there is an interesting setting "adjust display scale", that is, adjust the thickness multiple of line width display. This setting makes the setting of line width accurate only in print output, but schematic in screen display, so that the line with width has a better screen display effect

the line name is followed by a rough graphic description of the line shape with characters, indicating that the county boundary is in the shape of dotted lines. (the description is schematic and does not affect the shape of the actual linetype). The second line must start with a, indicating the alignment type. A positive number of 2.0 indicates a dash of 2 units, a negative number of -1.0 indicates a space of one unit, and a number of 0 indicates a dot

as for linetype names, Chinese characters can be used as linetype names from AutoCAD R14, but generally do not mix Chinese and English in R14 version. After using Chinese names, if you must use letters or numbers, you can only use full angle character format. There are no such restrictions in AutoCAD 2000. Limited to the width of the linetype box in the AutoCAD toolbar, the linetype name should not exceed 10 Chinese characters

(III) how to define the linetype defined by belt shape such as high-voltage line and city wall

in the definition of simple linetype, insert shape elements to form the linetype of strip definition. For example, the line type of high voltage line is defined as:

* high voltage line, -------

A 001, [circle, x, s=0.4], -0.4,1.8,

[arrow, x, s=1], 11.0,

[arrow, x, s=1.0, r=180], 1.8

the second to fourth lines are originally one line, which is for the convenience of writing. The square brackets are the shape definition part. A total of two shape elements are referenced three times. Circle is a unit circle and arrow is an arrow. Both shape elements are placed in the shape file named X

[arrow, x, s=1.0, r=180] means: a unplug the power cord rrow is the shape name, refers to the arrow, X is the shape file name where arrow is stored, and put it in the execution path of AutoCAD, s is the scale factor, s=1.0 is to keep arrow in the size in the shape definition, R is the rotation angle, r=180 is to turn 180 degrees when arrow is inserted. The complete definition of shape element is as follows:

[shape_name, shape_file_name, s=scale_factor,

r=rotation_angle, x=x_offset, y=y_offset]

---- x_ Offset and Y_ Offset is the offset of the shape insertion point in the X and Y directions. It is generally not used by default when defining the map linetype, and it is treated as 0. In addition, the default value of R is 0, s is 1, and only shape_ Name and shape_ file_ Name cannot be defaulted

--- describe the definition of high voltage line in detail. The number 0.001 after the second line a is to move the pen to the beginning, that is, to place a short line. Then draw a circular element with a radius of 0.4. After drawing a circle, the function of the number -0.4 is to leave a space of 0.4 drawing units, so that the stroke moves over the circle, and the subsequent drawings do not overlap on the circle. Then draw a 1.8-long short line and an arrow shaped element. Behind the arrow is a short line of 11 units, followed by an arrow that turns 180 degrees and a short line of 1.8 units

(IV). How to define linetype with text string

insert text string into simple linetype to form linetype with text string. This method is rarely used in the processing of topographic maps. The following example typically reflects its definition method. The meaning of S, R, x, y is the same as the reference to shape element in the above. In AutoCAD 2000, Chinese text strings can be used, but the Chinese font used must be defined in the drawing before using linetype

* dividing line, ---- dividing line ---- dividing line -----

a, 20, - 5, ["dividing line", medium line body, s=1, r=0.0, x=0, y=-.5], -5

(V). Shortcut to generate shape

1 There are two file forms before and after the definition of shape: SHP and shx。. SHP is a text file, which can be defined by any texter SHP file. Use the compile command in the command line of AutoCAD to convert Shp files are compiled into SHX file SHX file is a file directly called by AutoCAD, which is called in with the load command After SHX file, the shape command can be used to insert the shape depicted by the shape as if it were a block

2. The three lines of text in the next paragraph are the definition of Chengdu in the shape file (P) defined when drawing the map. The first line of double semicolon is followed by explanatory text, which can be used in Chinese and English or characters at will. The second line * indicates the beginning of a definition, and the line where * is located is the title line of general information about shapes, where "2" is the sorting number of the shape defined in P, "6" is the byte length of the numerical description line, and "gwall" is the name of the shape. Starting from the third line is the number description line. These numbers control a "virtual pen", control its movement and rise and fall, and rely on it to "draw" the shape

;; Chengdu

*2,6, gwall

003,5034040,03c, 0

3 Customizing shapes is more complicated than defining linetypes. There is a detailed introduction in AutoCAD, which certainly looks laborious. It takes a little effort to learn it comprehensively. However, there is a shortcut here. I have debugged a public LISP program make_ p. It can automatically convert the drawn DWG graphics into shape files and share them privately with friends on the site. However, friends who use AutoCAD 2000 do not need this program, because the "express" of AutoCAD2000 has its own shape making function. "Express" is an upgraded version of "bonus" in R14, and "make shape" is in its "tools"

>b> second, how to draw multilines such as highways

lines such as highways and highways are composed of several lines of different colors, which is very suitable for drawing multilines

The operation method of

multiline is as follows:

1 Select "multiline styles" under the "format" column of the menu to enter its dialog box

2. In the "multiline styles" dialog box, the first item is "current", which displays the name of the existing multiline. This displayed multiline will be used as the template of the new multiline, so you should press "lower triangle" to select the most suitable one from the existing linetypes, and the default is "standard". In "name", the name displayed by default is the name of the selected template linetype. You should enter a new name, and enter the appropriate description and descriptive text in "description"

3. Press the "add" button to add this line name to the current library. Now let's start setting the multiline

4. Press "element properties...", Enter the "element properties" dialog box and set each element in the multiline

5. In this dialog box, you can change the three parameters of color, linetype and offset by selecting the existing element (line) with the mouse. The "offset" refers to the distance between the selected (line) element and the centerline, which is positive above the center and negative below the center

6. In AutoCAD R14, the function of specifying linetype here is enhanced, which is a very useful function. After pressing this function button, enter "select linetype" to select linetype. If there are few currently available linetypes, you can also use "load..." Call in various customized linetypes. It can call the function of user-defined linetype, so that the multiline actually has the function of drawing pattern strips and lace, which in the past can only be achieved through programming

7. To add an element (that is, a line), press the "add" button, and then specify its offset, color, and linetype. After all lines are set, you can "OK" to exit, return to the main interface "multiline styles", and enter "multiline properties..." Settings for

8. In the multiline properties, some options of caps mainly determine the shape of thread ends. A very valuable function is "fill", select "on", and then set the fill color "color". The selected color will be filled in the multiline as the background color

9. Instances: definition

Copyright © 2011 JIN SHI