More drawing commands
Is there anything else we can draw? We have already covered lines, polylines, arcs, circles, ellipses, rectangles, polygons, points, donuts, splines and revclouds, and those commands alone are enough to cover most of our drawing needs indeed. Still there is more…
In AutoCAD there are two types of text you can create; Single line text and Multiline text.
Command for single line text: text
Command for multiline text: mtext, mt or t
Opposite to what you may think, the single line ‘text’ command allows you to write more than one line on the screen. Invoke this command and you are prompted to specify the starting point on the screen. Click anywhere in the drawing area and you are prompted to enter the text size and then the rotation angle. Try writing down something. Press ‘Enter’ and write something else in the next line. You can keep writing in as many lines as you wish, then to terminate the command press ‘Enter’ twice. Follow the command sequence:
Current text style: "Standard" Text height: 2.5000 Annotative: No
Specify start point of text or [Justify/Style]: Click on the screen
Specify height <2.5000>: Press ‘Enter’
Specify rotation angle of text <0>: Press ‘Enter’
If you use mtext rather than single line text, you will be prompted in a different way.
MTEXT Current text style: "Standard" Text height: 2.5 Annotative: No
Specify first corner: Click on the screen
Specify opposite corner or [Height/Justify/Line
spacing/Rotation/Style/Width/Columns]: Click on the screen to form a rectangle that will enclose your text
Try writing a couple of lines using mtext too. As soon as you get to the end of the rectangle you have specified, a new line will be started automatically. You can start a new line by pressing ‘Enter’ also. When you are done inputting text, click ‘ok’ in the text formatting toolbar (Acad2008) or the ‘close text editor’ panel that appears in the ribbon (Acad09). Note that if you try to select the single line text, you will be able to select it line by line while if you try to select multiline text you will select the whole thing at once.
While inputting text you are given various options. The height and the angle are quite straight forward and need minimal explanation. The default height is 2.5 and this can be set according to your needs when you are prompted to. The default angle is 0 which can also be set when prompted. The other options are to specify the justification and the style. Try to set the justification and you will be presented with the following prompt:
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]:
The text justification controls where text is displayed according to where you click on the screen. If you enter ‘tl’ at this prompt for example, it means that the text will be displayed in such a way that the point where you clicked on the screen is aligned to its top left corner. In the same way, ‘mc’ will align the text so the point is at the middle and center of it, ‘br’ to the bottom right hand corner and so on and so forth. Leave the style and other justification options for now; we will get to those later on.
Command for drawing multilines: mline or ml
Multilines are simply a number of lines that are parallel to each other and drawn together with one command. Drawing multilines is almost the same as drawing lines and polylines but with some differences that are specific to them. Consider the following command example:
Current settings: Justification = Top, Scale = 20.00, Style = STANDARD
Specify start point or [Justification/Scale/STyle]: Click anywhere in the drawing area
Specify next point: Click anywhere in the drawing area
Specify next point or [Undo]: Click anywhere in the drawing area
Specify next point or [Close/Undo]: Click anywhere in the drawing area
Specify next point or [Close/Undo]: Press ‘enter’ or ‘c’ to terminate command
In this example we have drawn two parallel lines that are 20 units apart (notice the Scale = 20.00 at the current settings prompt). The justification is set to top by default, and it can also be set to ‘zero’ or ‘bottom’. Zero would place the cursor at the middle of the two lines and bottom would set it to the bottom. The default style is standard and it is also the only one available, unless you set another style yourself.
Setting a multiline style
Command for setting a multiline style: mlstyle
As soon as you invoke this command you will be presented with the ‘multiline style’ dialogue box. You will notice that the only style present under styles is ‘Standard’ and a preview of it is shown at the bottom of the dialogue box.
Click the ‘New’ button on the right hand side to create a new multiline style and you will be presented with yet another dialogue box; ‘Create New Multiline Style’. Here you are prompted to enter a name for the style that you are going to create. Type in any name such as ‘mystyle’.
Press continue and here goes one more dialogue box! This is where we specify the details of our new multiline style. Enter a description for the style if you wish. On the left hand side under ‘caps’ you are given various options to cap your multiline at its start and at its end. Choose any and watch the preview at the ‘Multiline Style’ dialogue change accordingly. Choose a fill color to fill the space between the first and the last line in the multiline set. On the right hand side, under ‘elements’ there are two lines displayed. Click the add button to add another line in between them. The new line in the middle should be the one selected, if not, click to select it. Click on the color drop down list to set it to a different color, and click on the linetype button to set it to a different linetype. To select the linetype follow the same process as you did in the layers tutorial, i.e. by first loading the layer and then selecting it. You can also set the offset of the lines to change their positions relative to each other.
Click ‘ok’, make sure your new style is set to current by selecting it and clicking ‘Set Current’ in the Multiline style dialogue box and click ok. Try drawing multilines now to test your new style.
Try creating some more styles just to get the hang of it better. You can delete any unwanted styles you have created from the Multiline style dialogue box. In order to delete a style it must not be current, and it must not be used in your current drawing.
Traces are simply lines that have a thickness.
Command for drawing traces: trace
When drawing traces you are prompted to specify the trace width which by default is 1. Apart from this, drawing traces is like drawing lines with just one more exception; you cannot undo a point while you are drawing a trace.
You can also select to have traces filled or unfilled through the ‘fillmode’ system variable. This variable can be set to either ‘0’, not filled or ‘1’, filled. Follow the command sequence to change the fillmode system variable to ‘0’ and then draw some traces to notice the difference:
Enter new value for FILLMODE <1>: 0
X lines and Rays
X lines and rays are two different types of infinite lines that are usually drawn for use as construction lines. The difference between them is that x lines are infinite from both ends while rays are infinite from one end only. Both xlines and rays take the properties of the layer that they are drawn on and it is usually a good idea to have a separate layer for construction lines only.
Command for drawing x lines: xline or xl
Command for drawing rays: ray
When drawing xlines, you are prompted to select a point through which the xline will pass on the screen. As soon as you select the first point you are prompted to select another point and an xline is drawn. You are then prompted to select still more points and more xlines that pass through the first point and through each point you specify will be drawn. To terminate the command just press ‘enter’. You are also given the option to draw a horizontal or vertical xline, at a specific angle, bisect an existing angle or offset an existing line by a specific distance. Two command line examples are given here for reference. The first example to draw two xlines by selecting points dynamically on the drawing area and the second to draw an xline at an angle of 30 degrees that passes through point 130,65.
XLINE Specify a point or [Hor/Ver/Ang/Bisect/Offset]: Select first point
Specify through point: Select second point for first xline
Specify through point: Select second point for second xline
Specify through point: Press enter to terminate
XLINE Specify a point or [Hor/Ver/Ang/Bisect/Offset]: a
Enter angle of xline (0) or [Reference]: 30
Specify through point: 130,65
Specify through point: Press enter to terminate
To draw rays the same procedure as with drawing xlines in example 1 applies. The first point you select is the end with a finite point and the following points will be points through which the ray/s will pass. With rays you are not allowed any other ways to specify them as you are with xlines.