Hide "0" Quantity Items in Parts List

Hide "0" Quantity Items in Parts List

b.mccarthy
Collaborator Collaborator
5,428 Views
23 Replies
Message 1 of 24

Hide "0" Quantity Items in Parts List

b.mccarthy
Collaborator
Collaborator

Hello.

 

I'm not sure if this is standard behavior or not...

 

I have been playing with Model States and how it drives & updates a drawings associated part list. The list successfully updates when the specific model state is changed. I have no issues with the functionality, rather, with the data display in the parts list. Can the part list be set so that all line items with a "0" quantity are automatically hidden? I looked various places for some setting, but was unsuccessful.

 

TIA

0 Likes
Accepted solutions (2)
5,429 Views
23 Replies
Replies (23)
Message 2 of 24

b.mccarthy
Collaborator
Collaborator

Please disregard. I see through other posts that it cannot be done.

0 Likes
Message 3 of 24

johnsonshiue
Community Manager
Community Manager
Accepted solution

Hi! This request had been debated quite a bit within the Inventor Feedback Community during the project cycle. I personally think it would have been better if there was an option to hide the QTY zero rows. It seems that most test users want to see the zero rows so they could hide selectively.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 4 of 24

b.mccarthy
Collaborator
Collaborator

The testing group is a small cross section of the total Inventor community, and does not always reflect the majority. No one knows how users will respond to updates until everyone has the tools in a production environment. Autodesk is now seeing those responses. Giving the user both options seems like a very small concession indeed, and satisfies the wishes of all. Most of the functionality of Model States is impressive. However, what was an automatic process is now manual, and the toggling of visibility in a parts list costs time and money. Small issue with small assemblies, but much more so with larger assemblies. Upgrades are supposed to increase functionality and reduce our workload, not add to it. My clients may be unique, but if I present them with a part list that has entries with zero quantities, they will cast numerous and unflattering aspersions about my intelligence, usually prefaced with a common expletive. That would not be good day...

Message 5 of 24

theo.bot
Collaborator
Collaborator
Accepted solution

Hi @b.mccarthy , @johnsonshiue ,

 

I agree that zero is not a option for me. So I put a little code together that you can use for updating the parts list. If you create a rule with this code and connect it to the event trigger  "before save", then it will check if there is a column with the name "QTY" (if you use a different name, change "QTY" in code) and checks for items that have a zero value or not. If zero then make invisible else make visible. 

Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document 

Dim oPartslist As PartsList

If oDoc.ActiveSheet.PartsLists.Count <> 0 Then
	For Each oPartslist In oDoc.ActiveSheet.PartsLists
		' Iterate through the Columns of the parts list.
		Dim j As Long
		For j = 1 To oPartslist.PartsListColumns.Count
			Dim oColumn As PartsListColumn
			oColumn = oPartslist.PartsListColumns.Item(j)
			'Logger.Info(oColumn.Title & " " & j)
			If oColumn.Title = "QTY" Then
				Exit For
			End If
		Next
		
		If j > oPartslist.PartsListColumns.Count Then
			Logger.Info("no column found")
			Exit For
		End If 

		' Iterate through the Rows of the parts list.
		Dim i As Long
		For i = 1 To oPartslist.PartsListRows.Count
		' Get the current row.
		Dim oRow As PartsListRow
		oRow = oPartslist.PartsListRows.Item(i)

	    ' Get the QTY cell.
	    Dim oCell As PartsListCell
		   oCell = oRow.Item(j)
		If oCell.Value = "0" Then
			oRow.Visible = False
			Else
			oRow.Visible = True	
		End If
		Next
	Next
End If

 

Message 6 of 24

b.mccarthy
Collaborator
Collaborator

Perfect. Thank you!!

0 Likes
Message 7 of 24

Anonymous
Not applicable

as part of that test group, I adamantly opposed showing over not-showing or having an option.. and as I recall in a group discussion, more than half of the people in there agreed on not showing, and everyone agreed there should be an option.. we were all very excited about this new workflow that would make production drawings, BOM's and Parts Lists SOOOO much easier and accurate, but is basically useless, for us, when it comes to parts lists on drawings since we still have to create and filter using View Reps. 

 

I really hope this is addressed soon. 

Message 8 of 24

johnsonshiue
Community Manager
Community Manager

Hi! Indeed, it was a contentious debate. I would say it was like partial implementation. It is because iAssembly PartsList does support remove zero quantity rows.

The request is well-understood and totally legitimate. I just cannot comment when it will be done.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 9 of 24

Anonymous
Not applicable

Yes, definitely having the option to hide rows in parts list with zero qty (suppressed components) is a must and I believe it's very simple to be implemented.

Message 10 of 24

johnsonshiue
Community Manager
Community Manager

Hi Roger,

 

I also agree that there should be an option to hide those rows in PartsList just like iAssembly PartsList. However, it is not as easy as it sounds. The work to make it happen is in progress. But, it will not be for 2022 updates. A testable build may be available on Inventor Feedback Community later part of the year.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 11 of 24

rv43LSX
Contributor
Contributor

I'm suprised this workflow made it into the end product. The model state changes could have made working with automated (toggling suppression states and BOM's with iLogic) assemblies a much better experience. Especially since it's now possible to do this in 'master' state/lod, which circumvents a lot of state/lod problems previously present in Inventor. Yet, now the end user has to 'sometimes' check every drawing for zero QTY entires in any BOM. I'm stating 'sometimes' because the iLogic 'IsActive' command still sets BOM's to 'reference' and thus creates the behavior I would expect when something is suppressed in a model state: Make the part invisible and remove it from the BOM.

 

If a correct BOM is to be manually generated (with no '0' entries) the end user will still have to both suppress items AND set them to 'Reference' (or make entries invisible in the drawing BOM). It's a bit of a let-down, because Inventor can now easily handle this scenario with model states, but will show '0' entires in the BOM, which is rather silly. Not sure how this was passable for the test group. Perhaps they lacked power-users. 

 

Manually hiding entries means there's a brand new area where human error can occur. The point of modern CAD is to automate mundane and/or repetitive tasks, not create more.

 

TLDR: The suppress behavior should be universal and predictable: Make the part/feature/item/etc. dissappear completely.

Message 12 of 24

rv43LSX
Contributor
Contributor
Message 13 of 24

SBix26
Consultant
Consultant

Voted-- I agree, 0 qty lines in a part list should default to Invisible, be turned on only when desired by the user.


Sam B
Inventor Pro 2022.1.1 | Windows 10 Home 21H1
LinkedIn
autodesk-expert-elite-member-logo-1line-rgb-black.png

0 Likes
Message 14 of 24

mcgyvr
Consultant
Consultant

Autodesks typical "Whatever I set it at it stays persistent till I change it" is fine with me.

 

Luckily we have ilogic to make up for the lack of sufficient development time.



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 15 of 24

johnsonshiue
Community Manager
Community Manager

Hi Folks,

 

This is indeed on our radar. Please sign up Inventor Feedback Community to try the latest testable build for the future release.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 16 of 24

farshidDWRFR
Enthusiast
Enthusiast

Hi Theo,

 

I have the issue of "0" quantity in the Bill of Materials. Are you able to provide me with a piece of iLogic code to solve this issue?

 

Thanks in advance

0 Likes
Message 17 of 24

b.mccarthy
Collaborator
Collaborator

See code from @theo_bot above.

Works for me.

0 Likes
Message 18 of 24

farshidDWRFR
Enthusiast
Enthusiast

It works for Parts list in the drawing sheet. I want a code for creating BOM from an assembly.

0 Likes
Message 19 of 24

theo.bot
Collaborator
Collaborator

@farshidDWRFR 

 

I don't  have a code for that. The foundation of the suppress behaviour is explained by @rv43LSX in a previous post. To avoid the 0 QTY in a BOM you need to override the BOM structure and set it to reference before suppressing the component.

 

But maybe the easiest way to change it afterwards without coding is using the Spreadsheet edit.

  1. Copy the columns with the suppression state of a occurrence.
  2. Replace the "Compute/Suppress" in the Member name to  "BOM Structure"
  3. Replace all "Compute" values with "Default" in your new column
  4. Replace all "Suppress" values with "Reference" in your new column
  5. Save this excel before close

 

theobot_0-1639718431538.png

 

let's hope Autodesk will update this functionality soon, so we don't have to create workarounds and codes for this 😉

Message 20 of 24

Pete_Beauregard
Contributor
Contributor

This instructional video shows using view rep to control the zero quantity issue (towards the end):

 

https://www.youtube.com/watch?v=o0j07XRRTo8&list=WL&index=9&t=13s&ab_channel=KETIVTechnologies

 

 

IV 2026
Windows 11, 32GB Ram, Quadro Video
0 Likes