- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Get the suppressed state of a browserfolder (iLogic)
Hi All,
I need to manage the suppression states of alot of parts and folders in an assembly.
Now i use addapted code from manufacturing DevBlog
https://adndevblog.typepad.com/manufacturing/2015/05/suppress-folder-in-assembly.html
This works but with 60000+ parts and multiple folders it takes a long time to itterate through all.
The rule above suppresses every seperate occurence in a folder (+100occs) even tho i could suppress the entire folder
the following snippet is much faster in suppressing entire folders:
oDoc.SelectSet.Select(oBFolder)
ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyCompSuppressionCtxCmd").ExecuteThe problem with this is that I am not able to get the suppression state of the folder before toggeling it.
So if i need it suppressed and it is allready suppressed i can not check the status befor toggeling it.
Is it possible to get the folder suppression state in some way as it is shown in the Rightclick menu.
(the isActive part for BOM is not an issue in this situation)
Any leads would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
A very similar topic was started on this exact problem a day or two ago. doesn't look like its possible past cycling through each object in the folder and checking if they are all suppressed.
Sub Main
Dim oAsm As AssemblyDocument = ThisDoc.Document
Dim BrowserPane As BrowserPane = oAsm.BrowserPanes.Item("Model")
For Each oFolder As BrowserFolder In BrowserPane.TopNode.BrowserFolders
Dim bSuppressed As Boolean = True
For Each oPart In oFolder.BrowserNode.BrowserNodes
If oPart.NativeObject.Suppressed = False
bSuppressed = False
Exit For
End If
Next
MsgBox(oFolder.BrowserNode.BrowserNodeDefinition.Label & " Are all Suppressed? " & vbLf & vbLf & bSuppressed)
Next
End Sub