Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: Anonymous

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

EESignature

(Not an Autodesk Employee)