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).
This sample scales and rotates a CAD layer based on a selected feature in that layer
and a corresponding selected feature in another layer (non-CAD) in the map.
How to use:
Browse and select the ScaleRotateCADPrj.dll using the 'Add From File' button on the customization dialog.
From the 'Developer Samples' commands category, add the 'Scale/Rotate CAD file' command to an existing toolbar.
Select one line feature from the CAD layer and one corresponding line feature from the non-CAD data.
Click on the command and you will be presented with a preview dialog initially showing the CAD layer transformed so that the two
selected features line up with each other. Manipulate the options to get a good fit for the CAD layer, then
click on the OK button to apply the transformation. NOTE: This transformation will be applied to all layers. This transformation
is not being applied to the actual file but only to its representation within this ArcMap document. You can save this information
by saving the layer properties out to a file. There is no undo operation for this although you simply run this operation
again with newly selected features and it will reset itself. This information is stored in the layer properties. To access this
open the layer properties and click on the transformation tab.