Message 1 of 5
Routine for turn visible on for all components

Not applicable
05-26-2008
04:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want a routine where I can turn Visibility on, for all components.
This is my code, something is wrong.
thanks
Private Sub CommandButton9_Click()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim odef As AssemblyComponentDefinition
Set odef = oDoc.ComponentDefinition
Dim oOcc As ComponentOccurrence
For Each oOcc In odef.Occurrences
oDoc.SelectSet.Select oOcc
oOcc.Visible = True
Next
End Sub
This is my code, something is wrong.
thanks
Private Sub CommandButton9_Click()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim odef As AssemblyComponentDefinition
Set odef = oDoc.ComponentDefinition
Dim oOcc As ComponentOccurrence
For Each oOcc In odef.Occurrences
oDoc.SelectSet.Select oOcc
oOcc.Visible = True
Next
End Sub