Message 1 of 3
ModelStates iLogic rule for drawing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking to make a rule that would set the default modelstate for all the views on every sheet of a drawing
This is what ChatGPT gave me but it is spitting out some errors
Dim oDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Sheet
For Each oSheet In oDoc.Sheets
Dim oView As DrawingView
For Each oView In oSheet.DrawingViews
If oView.ReferencedModelDocument IsNot Nothing Then
Dim oModelState As ModelState = oView.ReferencedModelState
If oModelState.Name <> "Default" Then
oView.ReferencedModelState = oView.ReferencedModelDocument.ModelStateManager.Item("Default")
End If
End If
Next
Next
Can someone help?