Hello ,
i a made a browserfolder on assemblylevel and want to do the following things (ilogicrule) :
- Set the visiblility of the ocurrences in this folder.
- Set the bomstructure of the ocurrences (default when visible / reference when invisible)
When the folder contains a componentpattern ,the bomstructure of the patternelements doesn't change when i change the visiblility.
Can anyone see what's going wrong in my rule please ?
Thx
Private Sub SetVisibilityFolderContent(ByVal FolderName As String, ByVal Visibility As Boolean)
On Error Resume Next
oPane = ThisDoc.Document.BrowserPanes("Model")
'Get the browser folder object
oFolder = oPane.TopNode.BrowserFolders.Item(FolderName)
'Get the set of nodes in the folder
oFolderNodes = oFolder.BrowserNode.BrowserNodes
'Cycle through each browser node in the folder
For Each oNode As BrowserNode In oFolderNodes
oComp = oNode.NativeObject
'set Visibility folder contents
If Visibility = True Then
oComp.BOMStructure = Inventor.BOMStructureEnum.kDefaultBOMStructure
oComp.Visible = True
Else
oComp.BOMStructure = Inventor.BOMStructureEnum.kReferenceBOMStructure
oComp.Visible = False
End If
Next
End Sub