- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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:
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: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 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to get or determine unit vector of model geometry that face toward to drawing view...