186
|
Chapter 7
Applications
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
ConvertSDF Example Code (
continued
)
Summary of Contents for 15606-011408-9300 - MAP R6.3 UPG
Page 1: ...15306 010000 5060 October 2001 Autodesk MapGuide Release 6 Developer s Guide ...
Page 6: ...vi ...
Page 16: ...16 ...
Page 30: ...30 ...
Page 84: ...84 ...
Page 134: ...134 ...
Page 202: ...202 ...