Hi @NikelARH4K2. Give this iLogic rule a try for that task.
Sub Main
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Return
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets As Inventor.Sheets = oDDoc.Sheets
For Each oSheet As Inventor.Sheet In oSheets
Dim oViews As DrawingViews = oSheet.DrawingViews
If oViews.Count = 0 Then Continue For
For Each oView As DrawingView In oViews
If oView.DesignViewAssociative = False Then
Try
oView.SetDesignViewRepresentation(oView.DesignViewRepresentation, True)
Catch
Logger.Error("Error setting DVR as Associative in view named: " & oView.Name)
End Try
End If
Next 'oView
oSheet.Update
Next 'oSheet
oDDoc.Update
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield
(Not an Autodesk Employee)