Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i-assembly BOM issue?

19 REPLIES 19
SOLVED
Reply
Message 1 of 20
cbenner
3205 Views, 19 Replies

i-assembly BOM issue?

Good morning.

 

I'm doing a drawing of an i-assembly which has (4) members.  This i-assembly contains several parts which are only present in certain members.  In the screen cap I am attaching, you can see that in the Parts List manager, I have selected which instance I want the parts list shown for, and have checked the box to hide zero quantities.  However, in the Parts List table, all parts are shown.  This is also true in the table placed on the drawing.  The only option I can see is to statically remove (hide) the zero quantity parts, and I'd prefer not to do that.  Is this a known issue (bug) or have I missed a step somewhere?

19 REPLIES 19
Message 2 of 20
johnsonshiue
in reply to: cbenner

Hi! In the iAssembly factory, could you tell me how you configure the parts for each member? Did you use "Include/Exclude" status? Hiding the components would not make them disappear from BOM, since visibility does not control BOM.

Thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 20
cbenner
in reply to: johnsonshiue

I believe I used "compute/suppress" in the i-assembly table.  Is that the same as include/exclude?  I will look into this later when I can get back to that job, and I'll report back how it went.  Thanks Johnson!

Message 4 of 20
johnsonshiue
in reply to: cbenner

No, "Compute/Suppress" is a feature level control. It dictates whether or not a feature (not a component) will be computed or suppressed for the particular member in the iPart/iAssembly. To control component participation, you will need to use "Include/Exclude."

Please open the iAssembly factory file and edit the table. Go to Components tab or Exclusion tab and find the component. Then add the "Include/Exclude" item to the author table. Please keep in mind the visibility does not affect component quantity or the BOM table.

Thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 5 of 20
cbenner
in reply to: cbenner

OK,... most of the components of the i-assembly are themselves i-parts.  I used "include" on the components, and "table replace" to get the correct instance of each i-part in order to make all the various versions of the assembly.  Screen cap of the table is enclosed.  I fuzzed out anything proprietary,... that's why all the yellow.

Message 6 of 20
johnsonshiue
in reply to: cbenner

Hi! In the snapshot, do you see the first item "Include/Exclude" in each component node in the Components tab? Just click it and it will be added to the table.

Thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 7 of 20
cbenner
in reply to: johnsonshiue

Message 8 of 20
johnsonshiue
in reply to: cbenner

Hi! When you edit the Parts List->Member Selection, did you see the checkbox "Hide rows of zero quantity"? Is it checked? On my machine, if the option is checked, there is no need to manually remove the item with zero quantity.

Thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 10 of 20
mikebelter
in reply to: cbenner

I believe that for the parts list to show the correct quantities in the idw of an IAssembly member you have to have the model open and activate the member for which the idw and parts list are drawn.

 

Try that to see how it works. I do a lot of IAssemlies and find them very powerful. There still needs to be a bit of work done on the drawing / documentation side though to deal with these types of issues.

 

Thanks,

Mike

Message 11 of 20
zma1013
in reply to: cbenner

Older thread I know, but I may have found the reason why the rows are still showing. 

 

Note: The option works for QTY property only, it does not work for ITEM QTY or any custom property.

 

It's pretty stupid if you ask me.

IV2012

Windows XP SP3 32-bit
Intel Core 2 Duo 6400 @ 2.13 GHz
Nvidia Quadro FX 3450/4000 SDI 256MB Vram
2 GB Ram
160GB HDD
Message 12 of 20
DRoam
in reply to: zma1013


@zma1013 wrote:

Older thread I know, but I may have found the reason why the rows are still showing. 

 

Note: The option works for QTY property only, it does not work for ITEM QTY or any custom property.

 

It's pretty stupid if you ask me.


Yes, this is very stupid. It's been a while since this thread was updated, is there now any way to hide rows with zero quantity without having to include the "QTY" column?

Message 13 of 20
ThomasB44
in reply to: DRoam

Hi @DRoam

I agree with you, it's so stupid !

I've got the same problem in the past, and @Curtis_Waguespack found a fix with an iLogic rule in this thread (post #14/33).

I've modified his code :

 

SyntaxEditor Code Snippet

' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
    
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
   
' Iterate through the contents of the parts list.
Dim i As Long
'look at each row
For i = 1 To oPartList.PartsListRows.Count
oRow  = oPartList.PartsListRows.Item(i)
    'look at each column in the row
    Dim j As Long
    For j = 1 To oPartList.PartsListColumns.Count
        'look at the cell value
        Dim oCell As PartsListCell
        oCell = oRow.Item(j)    
        If oCell.Value = "0" Then
            'oCell.Value = "" 'clear the cell 
            oRow.Visible = False
        End If
    Next
Next 

 

But like me, i suppose you would want a fix without an iLogic rule Smiley Indifferent


Thomas
Mechanical Designer / Inventor Professionnal 2023
Inventor Professional EESignature

Message 14 of 20
DRoam
in reply to: ThomasB44

That's great, @ThomasB44, thanks! That will be helpful.

 

It would be even better if it could:

 

  1. Iterate through all my sheets and operate on each Parts List in my drawing
  2. Also turn the Visibility for a row back ON if the quantity is non-zero

This way I could just run the rule before printing a drawing and be confident that all Parts List have been updated appropriately.

 

If I find the time I could possibly figure out how to add those functions in myself, but if someone else finds the time before me and wants to tackle that, that would be great!

 

 

But yes, a built-in solution would definitely be much better.

Message 15 of 20
ThomasB44
in reply to: DRoam

Yes @DRoam, if i have a little time for this, i will try too, perhaps tomorrow.

And also, this rule needs to run with exception cases :

  • If it is not a drawing then message
  • If there is not some parts list then message

And a final message "X parts lists updated" to have a really cool use Smiley Very Happy


Thomas
Mechanical Designer / Inventor Professionnal 2023
Inventor Professional EESignature

Message 16 of 20

Hi ThomasB44 and DRoam,

 

I anticipated an issue with iterating through the columns and turning on/off rows that had zero, in that the code as previously written was likely going to turn it off, and turn it right back on when it went to the next column, which would have made it seem like nothing was happening.

 

 So I was going to provide a quick example where it just calls the QTY column... and then I just added this wish list while I was at it.

 

  • Iterate through all sheets and operate on each Parts List in drawing
  • Turn the Visibility for a row back ON if the quantity is non-zero
  • If it is not a drawing then message
  • If there is not some parts list then message &  prevent error
  • And a final message "X parts lists updated"

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

 

 

'check file type
If ThisApplication.ActiveDocument.DocumentType <> kDrawingDocumentObject Then
	MessageBox.Show("Come'on, what-a'ya tryin' ta'do to me here?" &vbLf &
	"This ain't no drawing!", "iLogic")
	Exit Sub
End If

' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
    
'Define the drawing sheet
Dim oSheet As Sheet

'capture the current active sheet 
Dim oCurrentNumber  As Sheet
oCurrentNumber  = oDrawDoc.ActiveSheet

Dim iCounter As Integer

iCounter = 0 'set default 
' Iterate through the sheets
For Each oSheet In oDrawDoc.Sheets 
	oSheet.Activate
	
	' Set a reference to the first parts list on the active sheet.
	' This assumes that a parts list is on the active sheet.
	Dim oPartList As PartsList
		
	Try
		'set to first parts list on the sheet
		oPartList = oSheet.PartsLists.Item(1)
		'increment counter
		iCounter = iCounter+1 
	Catch
		'catch error when no part list
		'comment the next line if you don't want a message here
		MessageBox.Show("Yo, there ain't a parts list on 'dis sheet.", "iLogic")
		
		'jump to named place
		Goto Jail 'do not pass go, do not collect $200
	End Try

   
	' Iterate through the contents of the parts list.
	Dim i As Long
	'look at each row
	For i = 1 To oPartList.PartsListRows.Count
		oRow  = oPartList.PartsListRows.Item(i)
		'look at QTY column
		'look at the cell value
		Dim oCell As PartsListCell
		oCell = oRow.Item("QTY")    
		If oCell.Value = "0" Then
			oRow.Visible = False
		Else
			oRow.Visible = True
		End If
	Next'row 
Jail: 'named place
Next'sheet	

'return to original sheet
oCurrentNumber.Activate

MessageBox.Show(iCounter & " parts list(s) updated.", "iLogic")
Message 17 of 20
DRoam
in reply to: Curtis_Waguespack

Curtis Waguespack: "Oh, by the way, while I was passing by I thought I'd just solve all your life's problems. That ok?"

 

Yes, Curtis, that's fine. How many times are you gonna make us say "You da man!"? Smiley Wink

 

Thank you for once again providing an excellent solution in record time. Can't thank you enough! And thanks, @ThomasB44, for getting the ball rolling!

 

Oh, and love the humor in the code by the way lol

Message 18 of 20
Curtis_Waguespack
in reply to: DRoam


@DRoam wrote:

 How many times are you gonna ...

 


Smiley Happy   You can blame ThomasB44 Smiley Tongue I saw he mentioned the other thread, and then when I looked in to see what was happening, I saw the line:  "For j = 1 To oPartList.PartsListColumns.Count" and that jumped out at me and looked like trouble (meaning that I got wrapped around the axel with this trying to do something similar in the past.)

Message 19 of 20

Happy to be blame Smiley LOL

Thanks a lot @Curtis_Waguespack for this code, and your funny comments Smiley Wink

And thanks @DRoam Smiley Tongue you're right about the Curtis super power :

"How many times are you gonna make us say "You da man!"? Smiley Wink"


Thomas
Mechanical Designer / Inventor Professionnal 2023
Inventor Professional EESignature

Message 20 of 20
tony.j.maresh
in reply to: DRoam

1. check "on" your Hide rows of zero quantity in the Select Member box (upper right icon in the Parts List edit box).

2. in the "Column Chooser" insert the property "QTY" to the BOM.

3. make the "QTY" column width 0.0. This will hide the column.

 

Make sure you use the property "ITEM QTY" for your actual BOM quantity.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report