Aaron Larson

BOM Rows for only Ballooned Components

Discussion created by Aaron Larson on Aug 23, 2017
Latest reply on Aug 24, 2017 by Aaron Larson

I'm creating a spare parts/service BOM type drawing.  Each sheet has specific components ballooned.  I'd like to have a table on each sheet that shows only the rows of the ballooned components (similar to the same question here).  I know that Composer can probably do this much easier but we don't have it and probably won't get it.  So... with the thought that it won't be the last time I'll have to create/update something like this I am out to make a macro. 

 

My question here is to get some feedback on the approaches.  I don't need a complete solution, I'm moderately experienced with the API.  Just looking for feedback from the community; no right or wrong necessarily.

 

Preconditions/Assumptions:

  • Macro is to be used on only the current sheet (no need for recursive)
  • There is a BOM table on the sheet
  • There are ballooned views (maybe not a strict precondition but let's assume there are)

 

Method 1:

  • Go through each view on the current sheet and interrogate the annotations.
  • For those that are balloons I can store the item number in a collection
  • Next grab the BOM table and go through each row and hide it if the item number is not in the Item Numbers collection

 

Method 2:

  • Get the BOM table first
  • Look at the row and get the component
  • Somehow see if the component has a balloon attached?
  • Or get the row and get the item number, then loop through all balloons to see if the item number is there, if not hide the row

 

Honestly I'm leaning toward method 1 but maybe there's a 3rd or 4th that's much easier that I'm not seeing.

Outcomes