- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
As far as the code you posted goes, if you can get rid of the "i" Integer check there isn't really a reason it shouldn't work for any number of drawing views. I'm not sure why you want to keep track of 4 sets of values.
As far as solving the question asked; I had an issue where an ISO view was set for general dimensions to be Projected instead of True in a drawing. This caused the shop to produce a product that was too small. In order to identify this potential issue in the future I wrote a script to identify ISO views and check that property. I ran into the same issue with Arbitrary views so I came up with a function that works well in my working set.
I just multiply the X, Y, & Z values of the vector from Camera Eye to Camera Target and return as ISO if the output value is not 0. This works for me because all my views are oriented orthogonal to at least one of the origin planes unless it is an ISO/Custom orientation view, so I will have at least one value that is 0. If this will work for your working set you can use this function:
Function IsArbitraryViewISO(dv As DrawingView) As Boolean
Dim CameraDirectionUnitVector As UnitVector = dv.Camera.Eye.VectorTo(dv.Camera.Target).AsUnitVector
Dim VectorCoordinateMultiplication As Double = CameraDirectionUnitVector.X * CameraDirectionUnitVector.Y * CameraDirectionUnitVector.Z
If VectorCoordinateMultiplication <> 0 Then Return True
Return False
End Function
I call it anytime the "ViewOrientationTypeEnum" of the DrawingView returns as "kArbitraryViewOrientation".