Activate structured BOM view tab with iLogic

Activate structured BOM view tab with iLogic

ReneRepina
Collaborator Collaborator
2,908 Views
9 Replies
Message 1 of 10

Activate structured BOM view tab with iLogic

ReneRepina
Collaborator
Collaborator

Greetings all!

 

Is it possible to activate structured BOM view tab with iLogic? I enabled the view with iLogic, but I cannot find the code to activate (switch to) the structured BOM view tab.

 

ReneRepina_0-1623826137251.png

0 Likes
Accepted solutions (1)
2,909 Views
9 Replies
Replies (9)
Message 2 of 10

R.Mabery
Advocate
Advocate

Something like this?

 

Dim oBOM As BOM
oBOM = oAssyCompDef.BOM
		
Dim oBOMView As BOMView
oBOMView = oBOM.BOMViews.Item("Structured")

Thanks,
Randy Mabery
Applications Expert
IMAGINiT Technologies
0 Likes
Message 3 of 10

ReneRepina
Collaborator
Collaborator

@R.Mabery 

 

Hello Randy!

 

In your example, you have only reference of "Structured view" assigned to variable. There is no command to activate the "structured view" tab, at least I do not know how to activate it. As you can see on the picture below, those are all available commands for BOM view tabs.

 

ReneRepina_0-1623916025601.png

 

ReneRepina_1-1623916047646.png

 

 

0 Likes
Message 4 of 10

R.Mabery
Advocate
Advocate

I guess I was confused by what you meant by activate.  Can you elaborate?

 

Are you referring to enabling the view?  

 

oBOM.StructuredViewEnabled = True

Thanks,
Randy Mabery
Applications Expert
IMAGINiT Technologies
0 Likes
Message 5 of 10

ReneRepina
Collaborator
Collaborator

@R.Mabery 

 

No, "Structured view tab" is already enabled. BOM remembers last viewed tab and it is possible that it is not switched on "Structured view tab". I would like to run an iLogic that opens BOM (which I already have) and switch to "Structured view tab" if it is not active (focused) - meaning some other tab is currently active (for example "Model Data view tab").

0 Likes
Message 6 of 10

R.Mabery
Advocate
Advocate

Again, I didn't understand your question.  I assumed you were trying to access the structured BOM with iLogic in order to work with it.

 

I am unaware of a way to 'open'  the BOM window and switch to the Structured view tab.

 


Thanks,
Randy Mabery
Applications Expert
IMAGINiT Technologies
0 Likes
Message 7 of 10

Curtis_W
Consultant
Consultant

Hi @ReneRepina 

 

See this link... unfortunately though I was never able to get the SendKeys to use Ctrl + Tab in the BOM window after opening it with the command manager, but it's been a couple of years since I looked at into this.

 

Solved: Send a CTRL+TAB keystroke to iProperties dialog with iLogic - Autodesk Community

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 EESignature

0 Likes
Message 8 of 10

ReneRepina
Collaborator
Collaborator

@R.Mabery 

Yes exacly. I want to access BOM list and have "Structured" tab selected. But I cannot find the iLogic code to switch between tabs in BOM.

 

@Curtis_W 

Hello Curtis,

thanks for the suggestion, but the problem with this solution is, that I can have "Structured" tab already selected (from previous interactions with BOM) and it will switch to next tab, if I use send keys, which I do not want in case "Structured" is already selected.

 

 

0 Likes
Message 9 of 10

Curtis_W
Consultant
Consultant
Accepted solution

@ReneRepina wrote:

 

Hello Curtis,

thanks for the suggestion, but the problem with this solution is, that I can have "Structured" tab already selected (from previous interactions with BOM) and it will switch to next tab, if I use send keys, which I do not want in case "Structured" is already selected.


Hi @ReneRepina 

 

I was not offering a solution, I was attempting to point you to some information on the subject from the past ( November of 2018)

 

But I just looked and found that I had revisited this topic in February of 2020, but forgot about it until running across it just now.

 

... in that discussion Mike Deck provided a rule to open the BOM editor to the specified tab. 

 

Please see this link:

https://forums.autodesk.com/t5/inventor-customization/open-bom-on-the-right-tab/m-p/9317332#M105793

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

 EESignature

Message 10 of 10

ReneRepina
Collaborator
Collaborator

@Curtis_W 

Sorry for late reply.

Thank you for the extra information and the reference!

Probably this iLogic would work as you guys tested, but we won't implement it, because we need simpler solution. Maybe Autodesk will provide a function in future.

 

Thanks for the help!

0 Likes