Autodesk 15606-011408-9300 Developer Guide - Page 195
On Error GoTo ErrHandler
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 195 highlights
SDFInfo Example Code (continued) Dim oTlkt As New SdfToolkit Dim oBox As SdfBoundingBox 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 'Get the SDF extents Set oBox = oTlkt.BoundingBox 'Begin spatial search for polylines oTlkt.BeginSpatialIndexSearch sdfPolylineClass, oBox '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 Sub ShowMessage(Msg As String) SDF Component Toolkit Applications | 195