Hi Everyone,
I think it might be possible, but I've never figured out what is needed.
When we use this code, it opens the BOM editor with the "cursor" where the highlight is, same as clicking the Bill Of Materials button on the ribbon.
Imports System.Windows.Forms
Dim oCommandMgr As CommandManager
oCommandMgr = ThisApplication.CommandManager
oControlDef = oCommandMgr.ControlDefinitions.Item("AssemblyBillOfMaterialsCmd")
Call oControlDef.Execute2(False)
This versions sends CTLR + TAB, which when done manually advances to the structured tab of the BOM editor, but for some reason when done with this example code it sets the "cursor" to the Done button.
Imports System.Windows.Forms
Dim oCommandMgr As CommandManager
oCommandMgr = ThisApplication.CommandManager
oControlDef = oCommandMgr.ControlDefinitions.Item("AssemblyBillOfMaterialsCmd")
Call oControlDef.Execute2(False)
SendKeys.SendWait("^{TAB}")
We can see it in action, but using this to get and then push the Done button:
Imports System.Windows.Forms
Dim oCommandMgr As CommandManager
oCommandMgr = ThisApplication.CommandManager
oControlDef = oCommandMgr.ControlDefinitions.Item("AssemblyBillOfMaterialsCmd")
Call oControlDef.Execute2(False)
SendKeys.SendWait("^{TAB}")
SendKeys.SendWait("{ENTER}")
Now if you're thinking this is all leading somewhere good, you'll be disappointed... because the trial and error method hasn't turned anything up for me in the past when I've messed with this...
... but maybe @MjDeck can shed some light on this for us?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com