Autodesk 15606-011408-9300 Developer Guide - Page 199
Dim xMin As Double, Debug.Print oBox.MinX, oBox.MinY
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 199 highlights
CopySDF Example Code (continued) End Sub Private Sub btnBrowseOutSdf_Click() On Error GoTo ErrHandler cdOpen.Filter = "SDF Files (*.SDF)| *.SDF" cdOpen.FilterIndex = 1 cdOpen.DialogTitle = "Save SDF File" 'Show the open dialog box cdOpen.ShowSave sdfOutName.Text = cdOpen.FileName ErrHandler: 'Cancel was selected 'Just exit after resetting errhandler On Error GoTo 0 End Sub Private Sub btnCopy_Click() Dim msg As String 'Check for filenames If (sdfInName.Text = "") Or (sdfOutName.Text = "") Then ShowMessage "You must select filenames first.'" Exit Sub End If Dim oTlktIn As New SdfToolkit Dim oTlktOut As New SdfToolkit Dim oObj As SdfObject Dim oBox As New SdfBoundingBox Dim xMin As Double, yMin As Double, xMax As Double, yMax As Double Dim i As Long On Error GoTo ErrHandler 'Open the input sdf file in readonly mode oTlktIn.Open sdfInName, sdfOpenRead, True 'Open the output sdf file for write/append mode oTlktOut.Open sdfOutName, sdfOpenUpdate Or sdfOpenAlways, True 'Get insdf's extents Set oBox = oTlktIn.BoundingBox Debug.Print oBox.MinX, oBox.MinY, oBox.MaxX, oBox.MaxY 'Set up search area that is 1/3 of input sdf xMin = oBox.MinX + Abs((Abs(oBox.MaxX) - Abs(oBox.MinX)) / 3) xMax = oBox.MaxX - Abs((Abs(oBox.MaxX) - Abs(oBox.MinX)) / 3) SDF Component Toolkit Applications | 199