184
|
Chapter 7
Applications
ErrHandler:
'Cancel was selected
'Just exit after resetting errhandler
On Error GoTo 0
End Sub
Private Sub btnBrowseTxt_Click()
On Error GoTo ErrHandler
cdOpen.Filter = "Text Files (*.TXT)| *.TXT"
cdOpen.FilterIndex = 1
cdOpen.DialogTitle = "Open SDF File"
'Show the open dialog box
cdOpen.ShowOpen
txtTxtName.Text = cdOpen.FileName
ErrHandler:
'Cancel was selected
'Just exit after resetting errhandler
On Error GoTo 0
End Sub
Private Sub btnConvert_Click()
'Check if there is a file name in edit boxes
If (txtSdfName.Text = "") Or (txtTxtName.Text = "") Then
ShowMessage ("Select the TXT and SDF files first!")
Exit Sub
End If
Dim oTlkt As New SdfToolkit
Dim oObj As New SdfObject
Dim oGeom As New SdfObjectGeometry
Dim oSeg As New SdfObjectGeometrySegment
Dim oPnt As New SdfDoublePoint
Dim strMsg As String
Dim strObjType As String, strKey As String, strName As String, strUrl As
String, strCnt As String
Dim X As Double, Y As Double
Dim i As Long, j As Long
On Error GoTo ErrHandler
'Open the input text file
Open txtTxtName.Text For Input As #1
'Open the sdf file in read-only mode
oTlkt.Open txtSdfName.Text, sdfOpenUpdate Or sdfCreateAlways, True
'Indicate update process
ConvertSDF Example Code (
continued
)
Содержание 15606-011408-9300 - MAP R6.3 UPG
Страница 1: ...15306 010000 5060 October 2001 Autodesk MapGuide Release 6 Developer s Guide ...
Страница 6: ...vi ...
Страница 16: ...16 ...
Страница 30: ...30 ...
Страница 84: ...84 ...
Страница 134: ...134 ...
Страница 202: ...202 ...