Check if BOM Dialog is Open

Check if BOM Dialog is Open

etckerry
Enthusiast Enthusiast
723 Views
4 Replies
Message 1 of 5

Check if BOM Dialog is Open

etckerry
Enthusiast
Enthusiast

Hello all,

 

We have some routines that sort and renumber the BOM in an assembly document according to certain rules, but if the routines are run while the user has the BOM dialog open, they incorrectly renumber and fail to sort the list.

 

Is there a way to tell if the user has the BOM dialog open, or maybe close it for them prior to running the routine?

 

Thanks,

 

Kerry

0 Likes
Accepted solutions (1)
724 Views
4 Replies
Replies (4)
Message 2 of 5

jdkriek
Advisor
Advisor
Accepted solution

I haven't see anything exposed to the API for detecting this, but that doesn't mean it's not possible.

 

Are you working with iLogic, VBA, VB.NET, C# ?

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 3 of 5

etckerry
Enthusiast
Enthusiast

I'm using VB.NET.

 

Thanks,

 

Kerry

0 Likes
Message 4 of 5

etckerry
Enthusiast
Enthusiast

Of course, you're right - I was looking for a solution within the Inventor API, but this is something that is possible to do using Windows API calls.  Thanks for pointing me in the right direction.

 

-Kerry

0 Likes
Message 5 of 5

pavol_krasnansky
Enthusiast
Enthusiast

Hi, try this rule:

 

Dim oCommandMgr As CommandManager 
oCommandMgr = ThisApplication.CommandManager 
oControlDef = oCommandMgr.ControlDefinitions.Item("AssemblyOpenBOMEditorCmd")
Call oControlDef.Execute2(True)

 This rule closes the BOM editor.

0 Likes