Index Cover
AutoCAD Samples

AutoCAD Samples

There are 4 AutoCAD drawings included as samples

The ASRix menu and utilities must be installed and you should have thoroughly explored the section on the AutoCAD Interface before you tackle these examples.

The examples won't work as described unless you start your AutoCAD session by selecting one of the sample drawings from the ASRix menu under Start->Programs->ASRix->Samples->Drawings


  • Start with the sample
  • CUBE.DWG The image below shows both the axonometric drawing and the perspective view that was used to create the images used in this exercise.

  • Before you start you should check your
  • Settings where everything should be checked except "World Coordinate points selected in AutoCAD"

    What we're going to try to do is cover this cube with rectified images using 3D coordinates for rectification. You should be in Model Space looking at an isometric view of the box above and the various coloured text needs to be visible. (It's on layer TEXT)

  • First we will rectify GREY.BMP and put it on the bottom of the 3D grid in the CAD
  • drawing. Start by selecting ASR from the menu or by typing it at the command line. You will get a pickbox and the prompt to Select entity: You should select the grey text at which time one of two things will happen.
    1. ASRix will start with the image GREY.BMP
    2. You will be presented with some variation of the following dialogue box
    where you may have to change the file type in the file dialogue box to BMP and you may have to browse to find the image (it should be in the Images subdirectory under Samples) Once you have located and opened GREY.BMP you shouldn't see this dialogue box again during the exercise as ASRix assumes that you will be using the same image type and image location until told otherwise.

    Once you have GREY.BMP open in ASRix locate points as shown below using the following world coordinates:

    # X Y Z
    1 0 0 0
    2 10 0 0
    3 0 10 0
    4 10 10 0
    5 5 5 0

    For point #1 you may get the unlikely point data message, which is normal when world coordinates are 0,0,0, as this usually means you forgot to enter the values or connect a database.

    Once GREY.BMP is rectified to your satisfaction (be sure your camera is set to None) save it and you will be returned to AutoCAD which has been waiting with the prompt: Select any CAD entities you want to appear over this image:
    In this case select everything and press Enter.

    A bunch of stuff will happen quite quickly after which you should be presented with a view something like the following, and a prompt: Press any key to trim image (ESC to quit):

    To do a neat job of trimming the image you might want to turn on AutoCADs Object Snap ENDpoint if it is not already.

    Once the image is trimmed to your satisfaction the command AVP will restore the starting view and you should be left with a drawing that looks something like the following:

    If you got here the first time you tried to follow these instructions you are doing better than most. It is kind of a flaky interface until you get used to it because of the need to get AutoCAD to wait while you do the rectification so one keystroke out of place can crash the routine. The good news is that, as long as you saved the rectification, it's easy to go back.

    Next use BLUE.BMP and put the left face of the image on the left face of the drawing using the following world coordinates.
    # X Y Z
    1 0 0 0
    2 10 0 0
    3 0 0 10
    4 10 0 10
    5 5 0 5

    should give you the following when inserted into AutoCAD

    Next try moving BLUE.BMP to the back surface of the cube in the drawing by changing the world coordinates in ASRix. To do this use the command ASRDR (Detach and reRectify)

    BLUE.BMP will reopen and rectify then, in the Points List Window double click on each point and change the Y value of the world coordinates to 10 so that they look like this:

    # X Y Z
    1 0 10 0
    2 10 10 0
    3 0 10 10
    4 10 10 10
    5 5 10 5

    Next paste the left face of RED.BMP on the other back surface of the cube using these coordinates:

    # X Y Z
    1 10 10 0
    2 10 0 0
    3 10 10 0
    4 10 0 10
    5 10 5 5
    The result should look like this in ASRix:

    and, when inserted into AutoCAD, like this

    Next paste the right face of CYAN.BMP onto right front surface of the cube using these coordinates:

    # X Y Z
    1 0 0 0
    2 10 0 0
    3 0 0 10
    4 10 0 10
    5 5 0 5

    Which should give you this in AutoCAD

    Then the left face of GREEN.BMP onto left front surface of the cube using these coordinates:

    # X Y Z
    1 0 0 0
    2 10 0 0
    3 0 0 10
    4 10 0 10
    5 5 0 5

    should gives this in AutoCAD

    Finally put a lid on your box with MAGENTA.BMP with coordinates:

    # X Y Z
    1 0 0 10
    2 10 0 10
    3 0 10 10
    4 10 10 10
    5 5 5 10


  • Start with the sample

    What we're going to try to do is cover this simple shape with rectified images. Unlike the cube the world coordinates are not immediately obvious so there are two possibilities:

    1. Get them from a data file
    2. Select them in the AutoCAD drawing
    We'll do the front and left side using the database values

    In Settings everything should be checked except World Coordinate points selected in AutoCAD

    Start by selecting ASR (controlled by settings) from the menu or by typing ASR at the command prompt.

    You will get a Select entity: prompt, and you can select anything in the drawing that is magenta to start a search for the image FRONT.JPG The front wall works because it is on layer FRONT, the camera symbol works because it has an attribute value FRONT and the text works for reasons you can probably deduce. The image should be in the IMAGES subdirectory under SAMPLES though, to find it, you may have to change the file type in the file selection dialogue box to JPG.

    ASRix will open with the selected image.

    From the ASRix toolbar select to open the Database Connection dialogue box. Other ways to do this are to press F3 or to select Database Connection from the Tool Menu. Or, after selecting your first point, select the Change button for the Database point file in the Point Mapping dialogue box.

    No matter how you get there you should and select CART dbf file as the Predefined type and building.dbf from the Samples directory as the DB file.

    Select the four corners of the front of the building, travelling in a counter clockwise direction starting at the lower left to match the order of the point numbers as shown in the drawing. As you select each point the point number will increment and the world coordinates will be supplied by the database.

    Rectify and Save. ASRix will close and you will be returned to AutoCAD with the prompt: Select any CAD entities you want to appear over this image: (Select the frong wall) and then Press Enter or Space to trim image (ESC to quit): and trim your image to only the front wall. (As with the Cube, OSNAP will help do this neatly)

    Then the AVP command will return you to the view you had before you started.

    Next do the same thing with the LEFT wall and you should get the result below:

    For the rest of these exercises there are no valid database points so you will have to change the Settings so that the world coordinate points are selected in AutoCAD.

    When configured in this way the insertion process proceeds in two steps. First ASRix opens and you select the points on the image for which you have selectable AutoCAD points. In this case they are the corners of the roof (which are different from points 10-13 because of the overhang)

    You need not enter coordinates for these points, AutoCAD will supply these during the second step which starts once the necessary points have been selected and the image saved by ASRix.

    When you return to AutoCAD you will have to press a key to carry on and then you will be prompted to select the corresponding points in the model. When all have been selected ASRix will reopen and attempt to rectify the image based on this new data.

    When you are happy with the rectification and save the file the ASRix insertion routines will take over in the same way as for the images inserted earlier giving the result shown below:

    Or almost the same result. Just for fun you can try fitting the window into the left wall (or wherever you want for that matter) using the same procedure you applied to the roof.


    Here is a real world example, one image of about 100 and one survey station out of ten (about 1000 surveyed points) that were used to model the major surfaces of a church in Canada. This project was started when ASRix worked independently of AutoCAD and with 2D points only so you can only imagine the effort involved converting the 3D points to 2D values but the results can be helpful in understanding the importance of coordinate systems.

    Start by opening WALL.DWG from the Sample Drawings section of the ASRix menu

    Use the Alternate points feature of ASRix to import the file wall-2d.pts which is in the PTS sub-directory under SAMPLES

    This will rectify correctly though you will want to decrease the scaling factor in the Output Parameters dialogue box in order to include the peak.

    The problem is that, when inserted into AutoCAD the image can't figure out where it should go.

    Something similar happens with the Alternate points file wall-3d.pts which was derived directly from the survey data prior to the different stations being converted into the coordinate system of the drawing

    One solution, whenever you run into difficulties with coordinate systems is to use the ASRp command to force the selection of world coordinates from within AutoCAD. When ASRp is invoked you will be prompted to select each point in sequence and when all are selected ASRix will open and rectify the image based on the coordinates so collected. If you have a lot of images to do under these conditions the efficient thing to do is to adjust the Settings so that world coordinate points are selected in AutoCAD and then use the ASR command.

    In this example the points are circled and numbered for simplicity so you can quickly update the coordinates of these points.

    OOPS! Butterfly Take a look at the first two images in this section and see if you can identify the problem.

    It seems that some cowboy got points 6 & 7 mixed up (something that's easy to do in the field) so you will have to close ASRix and do it again. Starting with ASRp The quickest way to do this would be picking point 7 when it asks for 6 and vise versa, but, in the interest of clarity for the archival record it would be better to rename the points to conform to your field notes by renaming point #7 to #8, then #6 to #7 and finally #8 to #6. You can do this by double clicking the point in the Points List Window or hovering the cursor over the point in the Source Window and pressing F2

    There are a couple reasons why your rectification may not turn out exactly like the one above. If the peak is truncated it is because you need to adjust the scaling factor in the Output Parameters dialogue box. (In the example above it is set to 45) and, if the rotation is different take a look at the Axes or OHVs that determine the coordinate system of the rectified image. This example uses the defaults which results in an image that seems rotated. You could straighten it out by using the Baseline command in the Rectified Image Window (available by holding down Ctrl ) or right clicking and selecting the Baseline option then drawing a line that will define the rotation of subsequent rectifications. However, when a rectification is intended for insertion into AutoCAD these rotation manipulations should be avoided as the AutoCAD part of the process will sort this out.

    You can check this out, and see an example of why you should let the software make these calculations by using ASRi to insert the image into the drawing, ASRpv to adopt its plan view and M2B (clicking on the image frame) to move it to the back so you can see the relationship between the drawing and the image.

    It turns out that we were viewing the CAD drawing from inside the church so we could have easily made a correction that would have resulted in a mirrored image that might not be noticed on a symmetrical facade like this one but which would result in a seriously flawed model.

    If you have followed these instructions to this point, trim the image using AIC then use ASRvp to return to the original view which should be something like that below.



    This is a real world example from an archaeological excavation In Ottawa Canada

    The drawing was automatically generated using CART to process points downloaded from a total station. Each object is simply a line connecting identifiable points on the uncovered walls.


    Each has an EED attached that includes the survey station/database, the object name and the coordinate system.

    The images have the same name as the object

    The points selected are circled and numbered to match the database (accurately unlike the previous example)

    To make this work you need to:

    1. Select the appropriate image by either adjusting the
    2. Settings to look for Xdata or using the ASRx command to open ASRix with that image
    3. Then, in ASRix, connect to the
    4. archaeol.dbf database in the Samples directory.
    5. Select each circled point giving it the number shown
    6. (If you start with the lowest number they will increment automatically)
    7. Rectify and Save
    8. Insert the rectified image into the AutoCAD drawing
    9. Trim
    If you do this for each object/image you should end up with a drawing like the following:

    The small discrepancies in the photo mosaic are explained, for the most part by the differences in the rectification planes which you can see in the plan and end elevation views.

    Up Index Cover

    Inquiries to:

    Generated by: CART
    (Thu Sep 20 17:57:09 2007 )