Solid Edge Framework Type Library
AreaZoomCamera Method
X- coordinate of the bottom right corner of zoom window area.
Y- coordinate of the bottom right corner of zoom window area.
X- coordinate of the top left corner of zoom window area.
Y- coordinate of the top left corner of zoom window area.
Description
Zooms the camera view to the specified window area.
Syntax
Visual Basic
Public Sub AreaZoomCamera( _
   ByVal X1 As Integer, _
   ByVal Y1 As Integer, _
   ByVal X2 As Integer, _
   ByVal Y2 As Integer _
) 
Parameters
X1
X- coordinate of the bottom right corner of zoom window area.
Y1
Y- coordinate of the bottom right corner of zoom window area.
X2
X- coordinate of the top left corner of zoom window area.
Y2
Y- coordinate of the top left corner of zoom window area.
Remarks
This method is added to allow the user to zoom the view relative to a view rectangle declared by the ( view relative pixel ) coordinates (X1, Y1) and (X2, Y2)
Example
Imports System.IO
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub AreaZoom_Click(sender As Object, e As EventArgs) Handles AreaZoom.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objAssemblyDocument As SolidEdgeAssembly.AssemblyDocument = Nothing
        Dim SEInstallDir As DirectoryInfo
        Dim objView As SolidEdgeFramework.View = Nothing
        Dim objCurWindow As SolidEdgeFramework.Window

        Try
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            SEInstallDir = GetTrainingFolder()
            objAssemblyDocument = objApplication.Documents.Open(SEInstallDir.FullName + "\carrier.asm")
            objCurWindow = objApplication.ActiveWindow
            objView = objCurWindow.View
            objView.AreaZoomCamera(100, 100, 200, 200)

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try

    End Sub
    Function GetTrainingFolder() As DirectoryInfo
        Dim objInstallData As SEInstallDataLib.SEInstallData = Nothing
        Dim objInstallFolder As DirectoryInfo = Nothing
        Dim objTrainingFolder As DirectoryInfo = Nothing

        Try
            objInstallData = New SEInstallDataLib.SEInstallData
            objInstallFolder = New DirectoryInfo(objInstallData.GetInstalledPath())
            objTrainingFolder = New DirectoryInfo(Path.Combine(objInstallFolder.Parent.FullName, "Training"))
        Catch
        Finally
            If Not (objInstallData Is Nothing) Then
                Marshal.FinalReleaseComObject(objInstallData)
                objInstallData = Nothing
            End If
        End Try

        Return objTrainingFolder
    End Function

End Class
See Also

View Object  | View Members