07-28-2024
11:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-28-2024
11:40 AM
Hi @Alexrose1942 . Please try this code. You need to write down your keywords in line 3 (example: {"Ground", "abc", "qwert"}).
Dim oDDoc As DrawingDocument = TryCast(ThisDoc.Document, DrawingDocument)
If oDDoc Is Nothing Then Exit Sub
Dim sList() As String = {"Ground"}
For Each oSheet As Sheet In oDDoc.Sheets
For Each oView As DrawingView In oSheet.DrawingViews
Dim oRefDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
For Each oPlane As WorkPlane In oRefDoc.ComponentDefinition.WorkPlanes
For i As Integer = 0 To sList.Length - 1
If Not oPlane.Name.Contains(sList(i)) Then Continue For
Try : oView.SetIncludeStatus(oPlane, True) : Catch : End Try
Next i
Next
Next
Next
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.