Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
333 Views, 3 Replies

From which view the arbitrary view came from?

My drawing view orientation type get result as arbitrary view... How to get from which view the arbitrary view came from? I can't get any sample vba for this issue... the only have is how to make arbitrary view.... Below is my sample program that stuck due to result as arbitrary view...

 

VBa

Dim oCamera As Camera: Set oCamera = oDrawingView.Camera
Dim ViewUnitVector As UnitVector
Dim oApp As Inventor.Application: Set oApp = ThisApplication
Dim tg As TransientGeometry
Set tg = ThisApplication.TransientGeometry
Debug.Print oDrawingView.Camera.ViewOrientationType
Select Case oDrawingView.Camera.ViewOrientationType
Case kTopViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(0, 0, 1)
Case kBottomViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(0, 0, 1)
Case kFrontViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(0, 1, 0)
Case kBackViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(0, 1, 0)
Case kRightViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(1, 0, 0)
Case kLeftViewOrientation
Set ViewUnitVector = tg.CreateUnitVector(1, 0, 0)
End Select


Debug.Print ViewUnitVector.X
Debug.Print ViewUnitVector.Y
Debug.Print ViewUnitVector.Z