Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I want to control my BOM with ilogic for cutom user inputs.
I already got the sort function and show function to work.
Only problem i got is that the ilogic code does not work when there is a manual sort on any collumn.
Well the code works, but it does nothing.
To clear this you have to click rmb on the collumn that is manually sorted, and then click clear sort.
After this the code works fine.
Is there a way to built in a safety in ilogic that clears manual sorts?
Dim oAssem As AssemblyDocument = ThisDoc.Document Dim oBOM As BOM = oAssem.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True oBOM.StructuredViewFirstLevelOnly = True Dim oBOMview As BOMView = oBOM.BOMViews.Item("structured")
'sort bom on base QTY Call oBOMview.Sort("Base QTY", False)
'show bom
Dim oCM As CommandManager = ThisApplication.CommandManager Dim oCD As ControlDefinitions = oCM.ControlDefinitions Dim ShowBom As ControlDefinition = oCD.Item("AssemblyBillOfMaterialsCmd") ShowBom.Execute2(True)
'sort on item after bom closes Call oBOMview.Sort("Item", True) 'MsgBox("done") to check if the excecute2 fucntion is working.
Solved! Go to Solution.