Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I like to change visibility for all parts in a assembly (and sub assemblys) to unvisibility if the file namne contain "BQ".
I tried this, but it is not working:
Dim assemblyDef As AssemblyComponentDefinition = ThisDoc.Document.ComponentDefinition
Dim occ As Inventor.ComponentOccurrence
For Each occ In assemblyDef.Occurrences.AllLeafOccurrences
Dim refDoc As PartDocument = occ.Definition.Document
If iProperties.Value("Project", "Stock Number").Contains("BQ") Then
occ.Visible = False
Else
occ.Visible = True
End If
Next
Johan Sweden
Solved! Go to Solution.