Gets an attached drawing from a drawing set.
Item(AttachedDwg As Variant) As AttachedDrawing
Returns the attached drawing.
AttachedDwg
The following example attaches two drawings to the drawing set, gets one of the items in the set by passing the alias, and gets the other item by passing the index of the drawing in the set.
Dim amap As AcadMap
Dim prj As Project
Dim drset As DrawingSet
Dim atdr As AttachedDrawing
Dim cDrset As Integer, i As Integer
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
Set drset = prj.DrawingSet
Set atdr = drset.Add("ALIASNAME:\\DirName\\DwgName1.dwg")
Set atdr = drset.Add("ALIASNAME:\\DirName\\DwgName2.dwg")
Set atdr = drset.Item("ALIASNAME:\\DirName\\DwgName2.dwg")
Debug.Print "Found "; atdr.AliasPath
cDrset = drset.Count
For i = 0 To cDrset - 1
Set atdr = drset.Item(i)
If atdr.AliasPath = "ALIASNAME:\\DirName\\DwgName2.dwg" Then
Debug.Print "Found " & "DwgName2.dwg"
End If
Next i