Hello,
Is there a simple method to find a balloon in the IDW where it contains more balloons and more views.
At the moment we're checking each views Individually to find a balloon.
Software used: Inventor 2020.2.1 64-bit edition
It would be really helpful if we have a simple solution than what we're practising now and will save a lot of time for us.
Could someone help me with this topic.
Best Regards,
Sathish
Is the task just finding balloons or seeing which items in a parts list you haven't ballooned yet?
Inventor does have functionality to provide a list of items that haven't been ballooned yet..
I don't believe there is an out of the box filter to search for balloon numbers. If you are wanting to find a balloon, you could use the Zone title block and then when the drawings are ballooned, the drafter could place where the zone is for each balloon in the parts list.
Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands
Here is an example iLogic rule that will provide a list of all the balloons on each sheet, and tell you which view they are on.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet Dim oBalloon As Balloon Dim oBalloonValueSet As BalloonValueSet Dim oSheet As Sheet For Each oSheet In oDrawDoc.Sheets If oMesssage = "" Then oMesssage = oSheet.Name Else oMesssage = oMesssage & vbLf & oSheet.Name End If oSheet.Activate For Each oBalloon In oDrawDoc.ActiveSheet.Balloons oViewName = oBalloon.ParentView.Name oItem = oBalloon.BalloonValueSets.Item(1).Value oMesssage = oMesssage & vbLf & "Balloon # " & oItem & " is on " & oViewName Next oMesssage = oMesssage & vbLf & "___________________" Next oActiveSheet.Activate 'return to original sheet MessageBox.Show(oMesssage, "iLogic")
What do I do if there are too many balloons and the message box can't show them all within my screen? There is no way to zoom out or to scroll down to get the rest of the balloons in the list.
Curtis,
I just used your iLogic balloon listing script. Thank you for posting it! However, if the list is so long and goes off the screen, is there a way to add a scroll, so I can see the continued list beyond the edge of my monitor, or even better if I can specify which balloon I'm looking for, or even better if it can save the data to a text or an excel file so I can search those files.
Thanks,
Brent
I have a simple way! Left side have a bom list, double click in which ballon want to find then type many number in that. Check drawing you can see it as a different ballon!
Another method is to place the resulting string into a list of string and then show the list afterwards.
Add this line at the start of the rule
Dim oList as New List (of String)
Add this line in the balloon loop and remove
oList.add(oSheet.Name & " Balloon # " & oItem & " is on " & oViewName
Show this where the message box is showing
d0 = InputListBox("Prompt", oList, d0, Title := "Title", ListName := "List")
Here is the 3 lines added and the messagebox lines removed. It isn't tested but looks ok to me. The list box will give you a resizable and scrollable dialog box.
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet Dim oList as New List (Of String)
Dim oBalloon As Balloon Dim oBalloonValueSet As BalloonValueSet Dim oSheet As Sheet For Each oSheet In oDrawDoc.Sheets
oSheet.Activate
For Each oBalloon In oDrawDoc.ActiveSheet.Balloons oViewName = oBalloon.ParentView.Name oItem = oBalloon.BalloonValueSets.Item(1).Value oList.add(oSheet.Name & " - Balloon # " & oItem & " is on " & oViewName) Next Next oActiveSheet.Activate 'return to original sheet
d0 = InputListBox("Prompt", oList, d0, Title := "Title", ListName := "List")
Its just too bad the "Zones" of the sheet are not interactive. As this could be a property that is a "tick box" option in parts list to auto populate what zone the balloon appears in. This would be helpful for large factory installers instead of spending who knows how much time searching for balloons. If auto populated it saves designers time instead of needing to double check if the balloon is still there or has moved. Just a though.
Sheet + Zone, not just Zone, eh?
The scrolls work! Thank you! The only other feature that would be nice to see is if it could all be written to a separate Excel Spreadsheet so the data could be searched an analyzed for long lists.
Once you have your data in a list its only a few lines to get it into excel using goexcel, helpfile here showing the source of the functions and they are also in the excel tab of ilogic editor.
Below code assumes you have an excel workbook at given filename and sheet name is Sheet1.
Dim xlFileName as String =
"C\Temp\xlfile.xlsx"
For i As 1 To oList.Count
GoExcel.CellValue(xlFileName,"Sheet1", "A" & i)
Next
Is this code snippet for the excel export to be appended to the original code or ran as an additional rule?
I'm getting the following errors when I merge the 2 code snippets.
Yes to be appended to the code after the main loop has ran and list has been added to. Below is the corrected code and it sets the value of each list item to your excel cell.
Dim xlFileName as String =
"C\Temp\xlfile.xlsx"
For i As Integer =1 To oList.Count
GoExcel.CellValue(xlFileName,"Sheet1", "A" & i) = oList.Item(i)
Next
Thank you. I couldn't quite get this code to work for me but, I have, with the help of a colleague, got the code to output to a CSV which is more useful for my purposes . I've included the completed snippet that worked for me below. Many thanks
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet Dim oList As New List (Of String) Dim oBalloon As Balloon Dim oBalloonValueSet As BalloonValueSet Dim oSheet As Sheet For Each oSheet In oDrawDoc.Sheets oSheet.Activate For Each oBalloon In oDrawDoc.ActiveSheet.Balloons oViewName = oBalloon.ParentView.Name oItem = oBalloon.BalloonValueSets.Item(1).Value oList.Add(oSheet.Name & " , " & oItem & " , " & oViewName) Next Next oActiveSheet.Activate 'return to original sheet d0 = InputListBox("Prompt", oList, d0, Title := "Title", ListName := "List") oWrite = System.IO.File.CreateText(ThisDoc.PathAndFileName(False) & ".csv") 'Write Array out to String For Each Item As String In oList oWrite.WriteLine(Item) Next oWrite.Close()
Can't find what you're looking for? Ask the community or share your knowledge.