Finding browser node from BOM row object

Finding browser node from BOM row object

Raider_71
Collaborator Collaborator
724 Views
4 Replies
Message 1 of 5

Finding browser node from BOM row object

Raider_71
Collaborator
Collaborator

Hi guys,

 

I am trying to find the quickest way to determine if a specific instance of a part/assy is visible in the browser/graphics window by interrogating a BOM row. So I need to find the browser node instance associated with the BOM Row and then check if it's visible. Any pointers?

 

Cheers

0 Likes
725 Views
4 Replies
Replies (4)
Message 2 of 5

MechMachineMan
Advisor
Advisor

A BOM doesn't necessarily correlate to 1 occurrence. Especially true if item qty > 1.

 

But to grab the browser nodes from a BOM, do something like this:

 

BrowserPane.GetBrowserNodeFromObject( NativeObject As Object)

Where NativeObject is:

 

oBOMRow.ComponentDefinitions.Item(1)

ALTHOUGH This only returns the first match.

 

 

An alternative method is:

 

oOccs = oDoc.Occurrences.AllReferencedOccurrences(oBOMRow.ComponentDefinitions.Item(1))

 

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 3 of 5

Raider_71
Collaborator
Collaborator

Yes I understand what you mean about the qty > 1 concept. I am really referring to the structured BOM view. ...and then also if all instances of the Row object's items are invisible or visible...

 

Similar to when you have the BOM windows open and you select a BOM row then it highlights the browser nodes.

 

I hope I make sense here...

0 Likes
Message 4 of 5

Raider_71
Collaborator
Collaborator

So here is what I mean. I would to get the collection of highlighted browser nodes similar to when selecting a BOM row.

 

Browser nodes.png

0 Likes
Message 5 of 5

MechMachineMan
Advisor
Advisor

Yes, I understood. I just mistyped in my previous response. Both of the methods I described above are applicable to what you are wanting to do.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes