Autodesk 15606-011408-9300 Developer Guide - Page 186
MsgBox Err.Number & : & Err.Description, Dim oTlkt As New SdfToolkit
![]() |
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 186 highlights
ConvertSDF Example Code (continued) Close #1 ShowMessage txtTxtName.Text & " converted to " & txtSdfName.Text ShowMessage "Total features converted: " & j 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 btnDelete_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 Dim Key As String 'Get the key from Key = InputBox("Enter the key of the feature to be deleted: ", "Key Input", "Lake") If Key = "" Then Exit Sub End If Dim oTlkt As New SdfToolkit Dim oBox As SdfBoundingBox Dim oObj As SdfObject Dim strMsg As String Dim i As Long Dim objFound As Boolean On Error GoTo ErrHandler 'Open the sdf file in read-only mode oTlkt.Open txtSdfName.Text, sdfOpenUpdate Or sdfOpenExisting, True 'Begin spatial search for polylines oTlkt.BeginKeyIndexSearch (Key) 'Get first feature having key Set oObj = oTlkt.SearchToNextObject() 'End search oTlkt.EndSearch 186 | Chapter 7 Applications
![](/manual_guide/products/autodesk-156060114089330-developer-guide-ba2b80f/186.png)