Message 1 of 2
Part List Ballooned Components Only. Missing attached balloons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This Ilogic rule I have works great but the parts list is not including all of the attached balloons. It seems to look at the last attached balloon and not register the others. Can someone here assist me with this? 🙂
Dim oDoc As Document = ThisDoc.Document
oNamer = "BOM PL Balloons"
Dim UNDO As Transaction
UNDO = ThisApplication.TransactionManager.StartTransaction(oDoc, oNamer)
'Your iLogic code goes in here:
'-------------------------------------------------------------------------------------------------------------------------------------
If oDoc.DocumentType <> kDrawingDocumentObject Then
MessageBox.Show("Run in drawings only!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End If
Dim oSheet As Sheet = oDoc.ActiveSheet
If oSheet Is Nothing Then
MessageBox.Show("Only valid for dwg files with sheets!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End If
If oSheet.PartsLists.Count = 0 Then
MessageBox.Show("Only valid for sheets with a BOM.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End If
Dim oPL As PartsList = oSheet.PartsLists(1)
If oPL.PartsListRows.Count < 1 Then
MessageBox.Show("Only valid For partslists With actual rows", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End If
If oSheet.Balloons.Count < 1 Then
MessageBox.Show("Rule only valid For sheets With balloons!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End If
On Error Resume Next
For Each oRow In oPL.PartsListRows
oRow.Visible = False
Next
If Err.Number <> 0 Then
MessageBox.Show("Issue setting row visibility Or accessing rows...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
End If
Err.Clear
Dim oBalloon As Balloon
Dim oBVS As BalloonValueSet
On Error Resume Next
Dim oIN As String
For Each oBalloon In oSheet.Balloons
For Each oBVS In oBalloon.BalloonValueSets
oIN = oBVS.ItemNumber
If Err.Number <> 0 Then
MessageBox.Show("Issue grabbing Balloon item number...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
End If
Next
Err.Clear
For Each oRow In oPL.PartsListRows
If oRow.Item(1).Value = oIN
oRow.Visible = True
End If
Next
If Err.Number <> 0 Then
MessageBox.Show("Issue iterating PL/setting visibility back On", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
End If
Err.Clear
Next
On Error GoTo 0
'-------------------------------------------------------------------------------------------------------------------------------------
UNDO.End