RobotStudio event

360 Degree View

Is there a way to do a fly through where the robot stays centered and you rotate 360 degrees around the robot?
I tried a fly through but as it goes around the robot it zooms in and out like it is dependant on the view center perhaps?
Thanks for any help that is available!!!


  • Hi P,
    Here's some VBA code that does what you want. Just change the constants to suit your needs.

    Sub RotateView()
        ' Constants
        Dim lookAt As New Position
        lookAt.x = 0
        lookAt.y = 0
        lookAt.z = 1
        Dim rotateRadius As Double
        rotateRadius = 4
        Dim rotateHeight As Double
        rotateHeight = 1
        Dim step As Integer
        step = 5 ' degrees
        ' Code
        Dim view As view
        Set view = Application.ActiveView
        view.lookAt = lookAt
        Dim lookFrom As New Position
        lookFrom.z = lookAt.z + rotateHeight
        Dim rad As Double
        For deg = 0 To 360 Step step
            rad = deg * 3.14159 / 180#
            lookFrom.x = lookAt.x + rotateRadius * Cos(rad)
            lookFrom.y = lookAt.y + rotateRadius * Sin(rad)
            view.lookFrom = lookFrom
        Next deg
    End Sub


    Johannes Weiman
    Software Engineer
    ABB Robotics
  • Thank you for the quick response - I will see if I can get it to work.