360 Degree View
P Diddy
✭
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!!!
0
Comments
-
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
view.Redraw
Next deg
End Sub
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
Thank you for the quick response - I will see if I can get it to work.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings