- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
So I have some parts from an assembly grouped into a folder. How can I make that folder and the parts from that folder visible or not with iLogic?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have tried this ilogic code and it works. Be sure to place the paths of your files and folders well.
If you see an error, check that you have permission to modify these files and not just read.
'File Hidden IO.File.SetAttributes("C:\Users\Sergio\Desktop\BloquePrint3D.ipt", IO.FileAttributes.Hidden) 'Folder Hidden IO.File.SetAttributes("C:\Users\Sergio\Desktop\DWG", IO.FileAttributes.Hidden)
I hope this helps with your problem. Regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@Anonymous wrote:
One simple question....
Assumptions of simplicity strike again..... or maybe I assumed incorrectly here too..
I think they meant a model browser folder and the files inside it.. Not Windows files/folders..
@Anonymous You really didn't explain how you want this code to determine which folder it should select but there should be some examples here that get you going..
https://forums.autodesk.com/t5/inventor-customization/ilogic-control-browser-folders/td-p/4644503
-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570
Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found after all the solution:
oPane = ThisApplication.ActiveDocument.BrowserPanes("Model") Select Case folder_visibility Case "No" oFolder = oPane.TopNode.BrowserFolders.Item("New Folder") oFolderNodes = oFolder.BrowserNode.BrowserNodes For Each oNode As BrowserNode In oFolderNodes oComp = oNode.NativeObject oComp.Visible = 0 oComp.BOMStructure = BOMStructureEnum.kReferenceBOMStructure Next Case "Yes" oFolder = oPane.TopNode.BrowserFolders.Item("New Folder") oFolderNodes = oFolder.BrowserNode.BrowserNodes For Each oNode As BrowserNode In oFolderNodes oComp = oNode.NativeObject oComp.Visible = 1 oComp.BOMStructure = BOMStructureEnum.kReferenceBOMStructure Next End Select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@Anonymous wrote:
I found after all the solution:
oPane = ThisApplication.ActiveDocument.BrowserPanes("Model") Select Case folder_visibility Case "No" oFolder = oPane.TopNode.BrowserFolders.Item("New Folder") oFolderNodes = oFolder.BrowserNode.BrowserNodes For Each oNode As BrowserNode In oFolderNodes oComp = oNode.NativeObject oComp.Visible = 0 oComp.BOMStructure = BOMStructureEnum.kReferenceBOMStructure Next Case "Yes" oFolder = oPane.TopNode.BrowserFolders.Item("New Folder") oFolderNodes = oFolder.BrowserNode.BrowserNodes For Each oNode As BrowserNode In oFolderNodes oComp = oNode.NativeObject oComp.Visible = 1 oComp.BOMStructure = BOMStructureEnum.kReferenceBOMStructure Next End Select
You didn't mention anything about setting the parts to reference bom structure in your original post?
-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570
Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
You're right, I'm sorry I misunderstood the text! Regards ![]()
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn