AutoCAD Digitizing Crash Course

CE 397 GIS in Water Resources
University of Texas at Austin

The Civil Engineering Learning Resources Center (LRC) has a computer with a digitizing tablet set up for digitizing with AutoCAD (Release 12 for DOS). AutoCAD drawing files can be exported into AutoCAD's drawing exchange format (DXF) which can be imported into many other programs including Arc/INFO. AutoCAD is a drawing program that has been around for many, many years and has a very larger user base. It is well suited for digitizing.

The LRC publishes a web page containing description on how to get started on AutoCAD in LRC entitled AutoCAD Basics in the CE-LRC. There you will find information on how to start up the system, configure the digitizing tablet and save files. Follow those instructions to get you set up. Follow the instructions on this page from the point when you are ready to tape your map to the digitizing tablet (including digitizing tablet calibration). The LRC also has a copy of the AutoCAD User's Guide which you can sign out.

This page is geared towards creating maps for use with Arc/INFO. Here you can learn the essentials needed to create a map with AutoCAD and turn it into Arc/INFO format. Note that you might want to print these instructions before you go to the LRC AutoCAD computer, because you will not be able to access them from there (you will not be running Windows). As an example application we assume here that we have a map with a county line, a river and four sampling points with sample data.

A. General Notes.

1. Entering Commands.

The easiest way to enter commands when digitizing is by using the keyboard (you can also use the pulldown menus, but that is often not convenient when digitizing). At the bottom of the screen you see a 'Command' prompt. That means AutoCAD is awaiting your instructions.

Many times a command invokes a dialog. For example, if you want to draw a line, type the LINE command and you will be prompted for the 'From point' on the command line. Click on any point on the digitizing tablet and the program will ask you for the 'To point' (followed by another 'To point' and another, etc.). When you are done with a command hitting 'Enter' will usually get you back to the 'Command' prompt. If you get stuck in a command hit 'Ctrl-C'. If you make a mistake try the UNDO command.

2. Zooming.

You can zoom in on certain parts of your map with the ZOOM command. There are several options for ZOOM which you will be prompted for after you enter the command. WINDOW zooms in on a window, PREVIOUS gets you back out to the previous view and EXTENT zooms to the extents of the drawing. Also check out the PAN command.

3. Entering Locations.

Many times AutoCAD will ask you for the location of a point. For digitizing you will mostly communicate that information by clicking on a point on the digitizing tablet (although you could also type in the coordinates on the command line). Use the top left button on the mouse. Keep in mind that there are a number of other options available which allow you to snap your point to other objects. For example, if you want to draw a line from the end point of another line type END (followed with ‘Enter’) at the 'Enter point' prompt and then click near the endpoint of that line. Another useful object snapping options is NEAR, which snaps to the nearest point of any other object.

4. Selecting features.

In certain cases AutoCAD will ask you to select one or more features to perform an operation on them (like erasing features). You can select these features by clicking on them. If you want to select multiple features draw a windows around the features. The selected features will appear sort of dashed in the display window. When you are done selecting hit 'Enter' to keep going.

5. Erasing features.

The ERASE command erases features. If you erase something by mistake try the OOPS or the UNDO command. Also see the discussion on see selecting features above.

B. Procedure.

1. Map Set Up.

Carefully tape your map to the digitizing tablet. In order to relate coordinates from the digitizing tablet to real world coordinates AutoCAD needs you to supply the coordinates of (at least) two points on your map. This process is called digitizing tablet calibration. If your map is not tied into any coordinate system you can assign your datum (0,0) at any point and then scale of the two points for the calibration from there. The best accuracy is achieved when you choose points that are in opposite corners of the map. Don't take two points on a graphic scale since your accuracy will be poor. For even greater accuracy use more than two points.

In our example the map is not tied into any coordinate system. We therefore will assign a point in the lower left hand corner of the map as datum. Then we will scale the x and y distance from our datum to an arbitrary point in upper right hand corner of the map. We mark the points in pencil on the map and write the coordinates next to them. This will permit us to reproduce the calibration at a later time if the map has to be removed from the tablet. Note that our datum is also our first point. Here's the dialog:

Command: tablet
Option (ON/OFF/CAL/CFG): cal
Digitize point #1:
Enter coordinates for point #1: 0,0
Digitize point #2:
Enter coordinates for point #1: 6000,7500
Digitize point #3 (or RETURN to end):

2. File Set Up.

The next step is to create some layers. Layers are like transparencies on an overhead projector. You can control whether layers are visible by turning them on or off (putting the transparency on or taking it off the projector). One layer is always the 'current layer'. If you add something to your map it will be added to the current layer (the top transparency). Layers provide a convenient way of organizing your data in AutoCAD, but if you want to transfer your map to Arc/INFO layers become more important than that. Put data you want in separate coverages on separate layers.

In our example we want to produce three coverages (county, rivers and spoints), we will therefore create three layers. Invoke the LAYER command and make three new layers named 'county', 'rivers' and 'spoints'. Make the 'county' layer the current layer and get back to the 'Command' prompt. The dialog looks like this:

Command: layer
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: make
New current layer <0>: county
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: color
Color: red
Layer name(s) for color 1 (red)
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: make
New current layer : rivers
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: color
Color: blue
Layer name(s) for color 5 (blue)
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: make
New current layer : spoints
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: color
Color: yellow
Layer name(s) for color 2 (yellow)
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: set
New current layer : county

Note that the current layer name is always shown on the top left corner on your screen.

3. Straight Lines.

If you want to add straight lines (e.g. legal boundaries, buildings) to your map you have to use the LINE command. The first question you have to answer is from what point the line should be drawn. Enter this point by clicking on the point on the digitizing tablet. Once you have specified the 'from point' the program will ask you for the location of the 'to point' and you can specify that point in a similar manner. The 'to point' becomes the new 'from point' and you can keep drawing a line from there. Once you are done hit 'enter' and you are back at the command prompt.

In our example we want to add the county boundary to the map. The dialog looks like this:

Command: line
From point: (CLICK)
To point (CLICK)
To point (CLICK)
To point (CLICK)
To point

Note that the lines were added to the 'county' layer since it is the current one. We can verify this with the LIST command, which displays more information about the feature. If you don't see what you have drawn on the screen try the ZOOM command. The dialog is as follows:

Command: zoom
All/Center/Dynamic/Extents/Left/Previous/Vmax/Window/: window
First Corner: (CLICK)
Other Corner: (CLICK)
Regenerating Drawing.

4. Not-Straight Lines.

If you want to add naturally curved features (e.g. contour lines, rivers) to your map it is best to use the SKETCH command. The SKETCH command allows you to draw a number of connected lines by moving the cursor like a pen across the digitizing tablet. The program will add a line at a specified interval (record increment) which you are prompted for after issuing the SKETCH command. Choose your record increment carefully. There is a tradeoff between accuracy and file size. In our example a record increment of 10 (feet) will be sufficient. After specifying the record increment clicking of the mouse button will control whether your 'pen' is up or down.

In our example we want to digitize the river. Note that before we use the SKETCH command we change the current layer to the 'river' layer so that the features will be added to that layer. The dialog looks like this:

Command: layer
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: set
New current layer : rivers
Command: sketch
Record increment <0.1000>: 10
Sketch. Pen eXit Quit Record Erase Connect . (CLICK> (CLICK) (CLICK) (CLICK) (ENTER)
792 lines recorded.

Note that the program informs us of the number of lines it added. If you see this number is too large you might want to increase the record increment. You can also use the LINE command to produce similar results, but you have to keep clicking at each vertix. The UNDO command can come in very handy at this point, especially when new to SKETCH.

5. Points with Attribute Data.

AutoCAD has provisions for attaching attribute data to points, but the attributes don't convert easily into Arc/INFO attributes. It is therefore easiest to add the points in AutoCAD and then add the attribute data to the map with Arc/INFO. Adding points is done with the POINT command. Here's the dialog to add one point:

Command: layer
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: set
New current layer : spoints
?/Make/Set/NEW/ON/OFF/Color/Ltype/Freeze/Thaw/LOck/Unlock: (ENTER)
Command: point
Point: near
to (Click)

Note that we used the NEAR to make sure that the points fall directly on the river. Repeat the above dialog for the other points.

6. Export from AutoCAD and Import into Arc/INFO.

The AutoCAD command DXFOUT writes the current drawing to a DXF file. For our example the dialog looks as follows:

Command: dxfout
Enter decimal places of accuracy (0 to 16)/Entities/Binary <6>:

Ones you have the map in DXF format you have to move it to your workspace on the Alpha workstations. Since you can not use the floppy disk drives on the Alphas you will have to ftp the files over the internet. To do that you have to leave the AutoCAD computer, because it does not have the ftp utility. Therefore you need to save your DXF file to a floppy disk. Then exit AutoCAD and move to another computer in LRC. Go to DOS (in the Main program group) and change to the drive and directory where the DXF file is located. Here is the dialog:

Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1995 Microsoft Corp.


Connected to
220 FTP server (Digital UNIX Version 5.60) ready.
User ( ce397m11
331 Password required for ce397m11
230 User ce397m11 logged in.
ftp> bin
200 Type set to I.
ftp> put digmap.dxf
200 PORT command successful.
150 Opening BINARY mode data connection for DIGMAP.DXF (,2230).
226 Transfer complete.
107529 bytes sent in 5.10 seconds (21.09 Kbytes/sec)
ftp> bye
221 Goodbye.


Now we will have to convert the map to Arc/INFO format. Move to an Alpha workstation and log in. Enter Arc/INFO by typing arc and hit enter. Let's take a look at the DXF file we have to make sure everything is the way we want it. for that we will use the DXFINFO command. Our dialog looks like this:

Arc: dxfinfo digmap.dxf

Check to see if all the layers are there and also check that the number of arcs and points per layer make sense. OK let's create some coverages from the DXF file using the DXFARC command. Here is how we convert the county lines from the county layer in the DXF file to a coverage called county. Note that we also build the appropriate topology at this time.

Arc: dxfarc digmap.dxf county

Enter layer names and options (type END or $REST when done)
Enter the 1st layer and options : county arcs
Enter the 2nd layer and options : end
Do you wish to use the above layers and options (Y/N)? y

No labels, killing XCODE...
Externalling BND and TIC...

3 Arcs written.
0 Labels written.
0 Annotations written.
0 Annotation levels.
Arc: build county arcs
Building lines...
Arc: build county nodes
Building nodes...

Arc: dxfarc digmap.dxf rivers

Enter layer names and options (type END or $REST when done)
Enter the 1st layer and options : rivers arcs
Enter the 2nd layer and options : end
Do you wish to use the above layers and options (Y/N)? y

No labels, killing XCODE...
Externalling BND and TIC...

792 Arcs written.
0 Labels written.
0 Annotations written.
0 Annotation levels.
Arc: build rivers arcs
Building lines...
Arc: build rivers nodes
Building nodes...

Arc: dxfarc digmap.dxf spoints

Enter layer names and options (type END or $REST when done)
Enter the 1st layer and options : spoints points
Enter the 2nd layer and options : end
Do you wish to use the above layers and options (Y/N)? y

No arcs, killing ACODE...
Externalling BND and TIC...

0 Arcs written.
4 Labels written.
0 Annotations written.
0 Annotation levels.
Arc: build spoints points
Building points...

Great. Let's take a look at our coverages in ArcPLOT.

Arc: arcplot
Arcplot: display 9999
Arcplot: mape county
Arcplot: linecolor 2
Arcplot: arcs county
Arcplot: linecolor 4
Arcplot: arcs rivers
Arcplot: points spoints

That looks pretty good, but we suspect a problem. The SKETCH command actually put a line every 10 feet. Let's see if Arc/INFO was smart enough to combine several AutoCAD lines into one Arc/INFO arc. We can see that by looking at the nodes of the rivers coverage by typing:

Arcplot: nodes rivers

Houston, we have a problem (about 790 of them). Arc/INFO did not combine lines into arcs. We can use the ELIMINATE command to fix this problem. Note that the ELIMINATE command allows you to perform the operation on a selective set of arcs. In our case we want to perform the operation on all the arcs in the coverage, so we select all the arcs that have a number other than zero.

Arcplot: quit
Arc: eliminate
Arc: eliminate rivers rivers2 # line
Eliminating lines in rivers to create rivers2
Enter a logical expression. (Enter a blank line when finished)
>: res rivers# ne 0
Do you wish to re-enter expression (Y/N)? n
Do you wish to enter another expression (Y/N)? n
792 features out of 792 selected.
Number of Arcs (Input,Output) = 792 3
Creating rivers2.AAT...

From the dialog above we can tell that we reduced the number of arcs from 792 to 3. It worked. Before we go back into ArcPLOT we want to add some attributes to the point attribute table (PAT) of the spoints coverage with the ADDITEM command:

Arc: additem
{decimal_places} {start_item}
Arc: additem spoints.pat spoints.pat number 4 4 i
Adding number to spoints.pat to produce spoints.pat.
Arc: additem spoints.pat spoints.pat bod 4 4 i
Adding bod to spoints.pat to produce spoints.pat.
Arc: additem spoints.pat spoints.pat do 4 4 i
Adding do to spoints.pat to produce spoints.pat.

Now enter ArcPLOT and put the coverages to the screen the same way you did before. To add attributes we will use the CALCULATE command. CALCULATE works on the select features of a coverage. That means we have to use selection commands to select our sampling points. Note that for larger databases it might be more convenient to add the data from other files (like an ASCII file). Instructions on how to do that can be found in the exercise from Feb. 12. Here is the dialog for sample point number one:

Arcplot: unselect spoints points
Arcplot: aselect spoints points one *

Arcplot: calculate spoints points ( number = 1 )
Arcplot: calculate spoints points ( bod = 1 )
Arcplot: calculate spoints points ( bod = 1 )

Repeat the same steps for the other sample points. Don't forget to clear your selection set using the UNSELECT command before you add the next point. ArcPLOT will let you know how many points are in the current selection set.

Lastly we will verify that our attribute data is there using the POINTTEXT command to label the sample points with the BOD value:

Arcplot: aselect spoints points
Arcplot: pointtext spoints bod

Nice Map!