Autodesk 15606-011408-9300 Developer Guide - Page 194
While Not oObj Is Nothing, Private Sub btnSrchSpat_Click
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 194 highlights
SDFInfo Example Code (continued) Dim oTlkt As New SdfToolkit Dim oObj As SdfObject Dim strMsg As String Dim i As Long On Error GoTo ErrHandler 'Open the sdf file in read-only mode oTlkt.Open txtSdfName.Text, sdfOpenRead, True 'Begin sequential search oTlkt.BeginSequentialSearch 'Get first feature Set oObj = oTlkt.SearchToNextObject() i=1 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 Wend '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 btnSrchSpat_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 194 | Chapter 7 Applications