Gets the IDs of objects in the save set.
GetObjects(Qualifier As ESaveSetObjectType) As Variant
Returns the IDs in an array of Long.
Qualifier
You can combine constants to specify more than one type. For example, to return the queried objects that have not been deleted and the new objects, the Qualifier argument is kQueriedExisted + kNewlyCreated.
The following example assumes you altered queried objects of a drawing before running this code. For sample code for querying a drawing and altering properties, click .This example adds queried objects to a save set and displays their IDs.
Dim amap As AcadMap
Dim prj As Project
Dim i As Integer
Dim entry As Object
Dim varArray As Variant
Dim lngIDArray() As Long
ReDim lngIDArray(ThisDrawing.ModelSpace.Count)
Dim strOutput As String
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
For Each entry In ThisDrawing.ModelSpace
lngIDArray(i) = entry.ObjectID
i = i + 1
Next
prj.SaveSet.AddObjects lngIDArray
varArray = prj.SaveSet.GetObjects(kQueriedExisted)
Debug.Print "SaveSet objects--all queried objects"
If UBound(varArray) > -1 Then
For i = 0 To UBound(varArray)
Debug.Print varArray(i)
Next i
End If