Attaching and Detaching Drawings

AutoCAD Map 3D .NET API

 
Attaching and Detaching Drawings
 
 
 

Attaching a drawing adds it to the drawing set for a project. Detaching a drawing removes it from the drawing set.

To attach a drawing, use DrawingSet.AttachDrawing(). Pass a single string argument that contains the alias and the path to the drawing to attach. The form is:

alias:\filename

This returns a reference to the attached drawing, an AttachedDrawing object.

When an attached drawing is activated, the file is locked against editing by other applications. To remove the lock, but keep the drawing attached, call AttachedDrawing.Deactivate(). To reactivate the drawing, call AttachedDrawing.Activate().