Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Finding a balloon in Inventor drawing

17 REPLIES 17
Reply
Message 1 of 18
Sathishkannan.Vijayan
1526 Views, 17 Replies

Finding a balloon in Inventor drawing

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

 

 

17 REPLIES 17
Message 2 of 18

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.. 



-------------------------------------------------------------------------------------------
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 3 of 18

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.

Autodesk Certified Professional
Message 4 of 18

Possible workaround:
Export drawing to PDF, then use Acrobat Reader's search function.

Does that help?

Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands

Message 5 of 18

Hi @Sathishkannan.Vijayan 

 

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")


http://inventortrenches.blogspot.com

Message 6 of 18
Anonymous
in reply to: Curtis_Waguespack

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.

Message 7 of 18

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

Message 8 of 18

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!

Message 9 of 18
A.Acheson
in reply to: brent_e_barbour

Hi @brent_e_barbour 

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")

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 10 of 18
brent_e_barbour
in reply to: A.Acheson

 A.Acheson,

 

I'm not fluent in iLogic.  I've taken a basic course online a while back, but haven't put it to any practical use since.  Can you please copy the original code and copy and paste your modification to show me the complete code of what you mean?

 

 

Thanks,

     Brent

Message 11 of 18
A.Acheson
in reply to: brent_e_barbour

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")

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 12 of 18
blandb
in reply to: A.Acheson

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.

Autodesk Certified Professional
Message 13 of 18
cadman777
in reply to: blandb

Sheet + Zone, not just Zone, eh?

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 14 of 18
brent_e_barbour
in reply to: A.Acheson

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.

Message 15 of 18
A.Acheson
in reply to: brent_e_barbour

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

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 16 of 18

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.

 

gareth_mooreZJRD6_0-1704791878321.png

 

Message 17 of 18

Hi @gareth_mooreZJRD6 

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

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 18 of 18

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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report