From which view the arbitrary view came from?

From which view the arbitrary view came from?

Anonymous
Not applicable
367 Views
3 Replies
Message 1 of 4

From which view the arbitrary view came from?

Anonymous
Not applicable

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

 

0 Likes
368 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Could you please explain a little more in detail what you try to do, since I don't understand the question?

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable

Usually drawing view is set face to Top view, Bottom View, Front View, Back View, Right View or Left View... But if those drawing view is from rotating 90° or 180° or 270° of that view the result was arbitrary view. Then how to get back this history either Top view, Bottom View, Front View, Back View, Right View or Left View.

0 Likes
Message 4 of 4

Anonymous
Not applicable

I want to get or determine unit vector of model geometry that face toward to drawing view...

0 Likes