Move CAD Layers


This sample code demonstrates how to change the transformation of the CAD data within your map session. You might want to change the transformation for the purpose of copying and pasting from the CAD file (this can be easier to do when the CAD data is in the same extent as what you are copying to).

How to use:
  1. Browse and select the MoveCADPrj.dll using the 'Add From File' button on the customization dialog.
  2. From the 'Developer Samples' commands category, add the 'Move CAD file' command to an existing toolbar.
  3. Add the Tool to an existing toolbar, then click on the button to activate it.
  4. Rubberband a box on the screen and each CAD layer in your map will be transformed to fit in the box.


Requires: CAD layer.

Difficulty: Moderate

Visual Basic
File Description
frmResources.frm Form containing the tool icon.
MoveCad.cls Class for transforming CAD data based on a user specified box.

Key CoClasses: CADLayer
Key Interfaces: ICadTransformations
Key Members: ICadTransformations::SetFromToTransform