Autodesk 15606-011408-9300 Developer Guide - Page 193
Do While Not oObj Is Nothing, objFound = Not oObj Is Nothing
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 193 highlights
SDFInfo Example Code (continued) On Error GoTo ErrHandler 'Open the sdf file in read-only mode oTlkt.Open txtSdfName.Text, sdfOpenRead, True 'Begin spatial search for polylines oTlkt.BeginKeyIndexSearch (Key) 'Get first feature Set oObj = oTlkt.SearchToNextObject() objFound = Not (oObj Is Nothing) i=1 Do While Not (oObj Is Nothing) ShowMessage "Feature: " & i & " " & GetObjectTypeString(oObj.Type) ShowMessage " Key : " & oObj.Key ShowMessage " Name: " & oObj.Name ShowMessage " Url : " & oObj.Url Set oObj = oTlkt.SearchToNextObject() i=i+1 DoEvents Loop 'If we come here, feature with specified key was not found If Not objFound Then ShowMessage ("Feature with specified key not found.") Else ShowMessage (i - 1 & " features with key " & Key & " found.") End If 'Close the toolkit oTlkt.EndSearch oTlkt.Close Exit Sub ErrHandler: 'Display the error number/message MsgBox Err.Number & " : " & Err.Description 'Reset the handler before exiting On Error GoTo 0 End Sub Private Sub btnSrchSeq_Click() 'Check if there is a file name in edit box If txtSdfName.Text = "" Then ShowMessage ("Select an SDF file first.") Exit Sub End If SDF Component Toolkit Applications | 193