Autodesk 15606-011408-9300 Developer Guide - Page 184
Dim strObjType As String, strKey As String, strUrl As, Dim i As Long, j As Long
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 184 highlights
ConvertSDF Example Code (continued) 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 184 | Chapter 7 Applications