DrawingSet collections contain the attached drawings of projects. You attach drawings to a project by calling the DrawingSet.Add function, as follows:
Dim atdr As AttachedDrawing
Dim amap As AcadMap
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set atdr = map.Projects(ThisDrawing).DrawingSet.Add("C:\\campus.dwg")
Using the GetTableList function of the DrawingSet, you can access AutoCAD symbol tables. You can get names of layers, line types, blocks, object data tables, and other symbol tables in a drawing.
The DrawingSet provides the frequently-used zoom extents feature.
boolVal = map.Projects(ThisDrawing).DrawingSet.ZoomExtents
The DrawingSet.Extents method gets extents of the drawing, which can define a query window, as shown in the following example.
Dim wind As WindowBound
Dim dblary As Variant
'Get DWG Extents
dblary = prj.DrawingSet.Item("MAPTUT:\\citymap7.dwg").Extents
'Define Boundary Area for Location
Set mapu = map.Projects(ThisDrawing).MapUtil
Set wind = mapu.NewWindow( _
mapu.NewPoint3d(dblary(0), dblary(1), 0), _
mapu.NewPoint3d(dblary(2), dblary(3), 0))
Through the AttachedDrawing objects in the DrawingSet collection, you activate and nest drawings, transform and save back drawing objects, and get information on a drawing, such as its alias or locked status.