Thankyou both for replies.
Unfortunately 'ViewOrientationFromBase' from base just returns a boolean value whereas I want to know how the view is orientated relative to the base.
JelteDeJong, the camera vector method is a good starting point. I realized that I would also need to know the angle or the camera. This will be very complicated to figure out (e.g. if my base view is of the Front face but rotated 90deg clockwise, the view to the right of the base view will be out bottom face. I'm sure that there will be a way to figure this out mathematically but my brain can't process this at this moment in time.)
I decided to go with the method of using the view positions...
For Each dwgView In ActiveSheet.Sheet.DrawingViews
'only look at alligned views so that we ignore isometric and floating section/detail views
If dwgView.Aligned = True
If dwgView.ViewType = DrawingViewTypeEnum.kProjectedDrawingViewType Or dwgView.ViewType = DrawingViewTypeEnum.kSectionDrawingViewType Then
If Math.Round(dwgView.Position.X) = Math.Round(baseView.Position.X) Then
If Math.Round(dwgView.Position.Y) > Math.Round(baseView.Position.Y) Then
'top
View(4) = dwgView.Name
Logger.Info("Top View: " & dwgView.Name)
Else
'bottom
View(2) = dwgView.Name
Logger.Info("Bottom View: " & dwgView.Name)
End If
Else If Math.Round(dwgView.Position.X) < Math.Round(baseView.Position.X) Then
'left
View(5) = dwgView.Name
Logger.Info("Left View: " & dwgView.Name)
Else
'right
View(3) = dwgView.Name
Logger.Info("Right View: " & dwgView.Name)
End If
End If
End If
Next
Wayne Helley
Inventor 2013 Certified Professional
Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit