Is it possible to use the .GetNext command but have it look in a direction instead of the next note or view that was added? Basically I am making a macro that will replace annotation text but I need it to search for the next annotation to the right, which might not have been the last annotation added. I attached an image of the order of progression that I need the macro to go in.
Below is my sub
Public Sub okclick() Dim y As Long Dim i As Long If IsNumeric(StartForm.TextBox1.Value) Then ID = StartForm.TextBox1.Value MsgBox "Start Number: " & ID Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swDraw = swModel Set swView = swDraw.GetFirstView While Not swView Is Nothing Set swNote = swView.GetFirstNote While Not swNote Is Nothing If swNote.GetText Like "~~" Then If swNote.GetText Like "~~" Then swNote.SetText ID ID = ID + 1 Set swNote = swNote.GetNext() Else Set swNote = swNote.GetNext End If Wend Set swView = swView.GetNextView Wend Else ClearForm End If Unload StartForm End Sub