07-23-2020
09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-23-2020
09:06 AM
Here is one way of getting that view.
And by the way, any time your iterating through members of a collection, there are "Item"s. And they are indexed by Integers. Even though, it doesn't say so in the clues, you can also enter a "quoted" string, instead of an Integer, that represents the name of the object (or view in your case).
If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("This rule '" & iLogicVb.RuleName & "' only works for Drawing Documents.",vbOK, "WRONG DOCUMENT TYPE")
Return
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oDView As DetailDrawingView
For Each oSheet As Sheet In oDDoc.Sheets
For Each oView As DrawingView In oSheet.DrawingViews
If oView.ViewType = DrawingViewTypeEnum.kDetailDrawingViewType Then
oDView = oView
End If
Next
Next
Wesley Crihfield
(Not an Autodesk Employee)