Makes the next record current.
Next( ) As Boolean
Returns True on success.
Create an object data table called SampleOD. For more information, click . Run this code to step through the records of each object in the drawing using ODRecords.Next.
Dim amap As AcadMap
Dim ODrcs As ODRecords
Dim boolVal As Boolean
Dim acadObj As Object
Dim prj As Project
Dim i As Integer
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
prj.ProjectOptions.DontAddObjectsToSaveSet = True
Set ODrcs = prj.ODTables.GetODRecords
For Each acadObj In ThisDrawing.ModelSpace
boolVal = ODrcs.Init(acadObj, True, False)
Do While ODrcs.IsDone = False
Debug.Print ODrcs.Record.tableName
Debug.Print ODrcs.Record.ObjectID
For i = 0 To ODrcs.Record.Count - 1
Debug.Print ODrcs.Record.Item(i).Value
Next i
ODrcs.Next
Loop
Next