- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@J-Camper I really appreciate your advice and the function provided, thank you! The reason I was keeping all the dimensions separate is because this code was based off a profile dimensioning function used in the same rule this code is for. So while it wasn't necessary for this code, I was trying to get a better understanding of collections in general. The goal of the rule is to export all the necessary data from blueprints to excel to be used with our panel saw optimizer. I was having trouble picking the desired view so I made my rule check each view for the info its looking for. The code I posted was working well enough if the view it was analyzing was a rectangular part but would not be able to handle non-rectangular ones. I have modified the function you provided to identify ISO views of parts of any shape. Using this and the profile dimension finder as well as a few other functions to identify notes and symbols containing keywords, I can now find my desired view and gather data from it without having to save information from all views. Thanks again!
Modified Function:
Function isViewISO(dv As DrawingView) As Boolean
Dim CameraDirectionUnitVector As UnitVector = dv.Camera.Eye.VectorTo(dv.Camera.Target).AsUnitVector
If Round(Abs(CameraDirectionUnitVector.X), 10) = 0.5773502692 Or _
Round(Abs(CameraDirectionUnitVector.Y), 10) = 0.5773502692 Or _
Round(Abs(CameraDirectionUnitVector.Z), 10) = 0.5773502692 Then
MsgBox(dv.Name & " IS ISO")
Return True
End If
Return False
End Function