Solid Edge Framework Type Library
GetCamera Method
Returns the x coordinate of the camera eye.
Returns the y coordinate of the camera eye.
Returns the z coordinate of the camera eye.
Returns the x coordinate of the target.
Returns the y coordinate of the target.
Returns the z coordinate of the target.
Returns the x coordinate of the (normalize) up vector.
Returns the y coordinate of the (normalize) up vector.
Returns the z coordinate of the (normalize) up vector.
Specifies if the View Perspective is set to true or false.
Returns the orthographic scale for non-perspective views or the field of view angle for perspective views
Description
Returns the settings of the camera.
Syntax
Visual Basic
Public Sub GetCamera( _
   ByRef EyeX As Double, _
   ByRef EyeY As Double, _
   ByRef EyeZ As Double, _
   ByRef TargetX As Double, _
   ByRef TargetY As Double, _
   ByRef TargetZ As Double, _
   ByRef UpX As Double, _
   ByRef UpY As Double, _
   ByRef UpZ As Double, _
   ByRef Perspective As Boolean, _
   ByRef ScaleOrAngle As Double _
) 
Parameters
EyeX
Returns the x coordinate of the camera eye.
EyeY
Returns the y coordinate of the camera eye.
EyeZ
Returns the z coordinate of the camera eye.
TargetX
Returns the x coordinate of the target.
TargetY
Returns the y coordinate of the target.
TargetZ
Returns the z coordinate of the target.
UpX
Returns the x coordinate of the (normalize) up vector.
UpY
Returns the y coordinate of the (normalize) up vector.
UpZ
Returns the z coordinate of the (normalize) up vector.
Perspective
Specifies if the View Perspective is set to true or false.
ScaleOrAngle
Returns the orthographic scale for non-perspective views or the field of view angle for perspective views
Example
Imports System.IO
Imports System.Runtime.InteropServices

Public Class GetCamera

    Private Sub btnGetCamera_Click(sender As Object, e As EventArgs) Handles btnGetCamera.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
        Dim EyeX, EyeY, EyeZ, TarX, TarY, TarZ, UpX, UpY, UpZ, ScaleAng As Double
        Dim boolPersp As Boolean

        Try
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            SEInstallDir = GetTrainingFolder()
            objAssemblyDocument = objApplication.Documents.Open(SEInstallDir.FullName + "\carrier.asm")
            objCurWindow = objApplication.ActiveWindow
            objView = objCurWindow.View
            objView.GetCamera(EyeX, EyeY, EyeZ, TarX, TarY, TarZ, UpX, UpY, UpZ, boolPersp, ScaleAng)
        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