Parts Visibility on View

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Does anyone have an idea on how to manage the visibity of parts on a particular view?
For example, in a view there 10 parts appeared. I would like to make only selected parts visible on the said view.
I have the manual steps on how to hide them but when I try to code it using the said step, the parts on the model file were hidden not in the view.
I use oView.ReferenceDocumentDescriptor.ReferenceDocument in traversing the parts but this refers to the model file.
Here is my code:
Set ViewDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument
For Each ViewOccurence In ViewDocument.ComponentDefinition.Occurrences
If Not nozzleName = ViewOccurence.ReferencedDocumentDescriptor.DisplayName Then
ViewOccurence.Visible = False
End If
Next
Please help me on this problem. I'm using VBA on this one. I just need a sample code for this.
Thanks in advance.