Autodesk 15606-011408-9300 Developer Guide - Page 191
Dim oTlkt As New SdfToolkit, Dim strMsg As String
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 191 highlights
SDFInfo Example Code (continued) Private Sub btnExit_Click() End End Sub Private Sub btnShowInfo_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 oTlkt As New SdfToolkit Dim oBox As SdfBoundingBox Dim strMsg As String On Error GoTo ErrHandler 'Open the sdf file in read-only mode oTlkt.Open txtSdfName.Text, sdfOpenRead, True 'Get SDF name strMsg = oTlkt.Name ShowMessage "SDF File opened: " & strMsg 'Get description strMsg = oTlkt.Description ShowMessage "Description: " & strMsg 'Get precision strMsg = oTlkt.Precision ShowMessage "Precision: " & strMsg & " bit" 'Get key length strMsg = oTlkt.MaxKeyLength ShowMessage "Max Key length: " & strMsg 'Get version strMsg = oTlkt.Version ShowMessage "Version: " & strMsg 'Get extents strMsg = "Min LAT: " & oTlkt.BoundingBox.minY & vbCrLf & _ "Min LON: " & oTlkt.BoundingBox.minX & vbCrLf & _ "Max LAT: " & oTlkt.BoundingBox.maxY & vbCrLf & _ "Max LON: " & oTlkt.BoundingBox.maxX ShowMessage "SDF Extents: " & vbCrLf & strMsg SDF Component Toolkit Applications | 191