1 Answers
A:
The "+/-" toggle in the Edit Parts List dialog controls the expansion or collapse of structured BOM rows, especially in hierarchical assemblies. Unfortunately, this UI element isn’t directly exposed via the Inventor API or VBA as a toggle method.
However, there are workarounds depending on what you're trying to achieve:
Control Structured View via PartsListRow.ChildRows
You can simulate expansion/collapse by hiding or showing child rows programmatically. Here's a VBA snippet that toggles visibility:
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oPartsList As PartsList
Set oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
Dim oRow As PartsListRow
For Each oRow In oPartsList.PartsListRows
If oRow.ChildRows.Count > 0 Then
' Toggle visibility of child rows
Dim oChildRow As PartsListRow
For Each oChildRow In oRow.ChildRows
oChildRow.Visible = Not oChildRow.Visible
Next
End If
Next
This doesn’t affect the "+/-" icon directly, but it mimics the behavior by collapsing or expanding rows.
Autodesk Inventor
AutodeskHelp the community
Be the First to Answer these questions
Disclaimer
Techjockey’s software industry experts offer advice for educational and informational purposes only. A category or product query or issue posted, created, or compiled by Techjockey is not meant to replace your independent judgment.
20,000+ Software Listed
Best
Price Guaranteed
Free Expert
Consultation
2M+
Happy Customers