Balloons to show assembly instead of part

Balloons to show assembly instead of part

Anonymous
Not applicable
592 Views
4 Replies
Message 1 of 5

Balloons to show assembly instead of part

Anonymous
Not applicable

I am working for a company that has very strict ship tag requirements. We are trying to automate the ship tags so we don't have to manually type them in every time. If the ship tag of the part changes, we want it to automatically update. Our ship tag is simply the name of the part or assembly being shipped out. If the item being shipped is simply a single part, everything works perfectly as shown in the first picture. The balloon is set to show the part number and is correct. 

Correct.PNG

 

The problem is when we want to ship an assembly. When we put a balloon on the assembly, it pulls the part number of the part we click on, not the assembly it is part of. The ship tag below should show "B0" instead of "B6".

Incorrect.PNG

 

Is there a way to set the balloon to pull the part number from the assembly instead of the part? I know it can be modeled differently to make it correct, but we cannot change the way it is modeled. 

 

A possible work-around is to use the item label as the ship tag because that will always show the correct number, but I cannot figure out how to make it automatically put our blue box around it. 

 

Any ideas are greatly appreciated. 

0 Likes
593 Views
4 Replies
Replies (4)
Message 2 of 5

MechMachineMan
Advisor
Advisor

One alternative you could do is to create sketched symbols that call off the Model Part number, and also draw the blue border around it within that.

 

If you only use 1 part per drawing/1 assembly, leaving it unattached will call off the first view doc, otherwise it will call off the part it is attached to.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 5

Anonymous
Not applicable
The problem is that if you attach the symbol to the assembly shown in the picture above, it will pull the part number from the part in the assembly, not the assembly itself. I know I can create a sub-assembly to fix this, but I cannot change the way it is modeled.

In the picture above the assembly is named "B0" while the part the balloon is attached to is named "B6". I want the balloon to display "B0", but I don't know how to make it pull the information from the assembly.
0 Likes
Message 4 of 5

MechMachineMan
Advisor
Advisor
Yes. Don't attach the symbol to anything in that case. *This only works reliably if the ONE assembly model is the only thing that occurs in the drawings - although you can have multiple views of that assembly*

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 5 of 5

CadUser46
Collaborator
Collaborator

jrk4402.  I knocked this together in VBA.

 

There are some assumptions:

  • I assumed the tag is called ShipTag.  Edit it to whatever you named it.
  • The name in the tag comes from what would effectively be the first base view (if you delete the first it would take the next).
  • In case you want the symbol to change width based on the text inside i added a line that finds the first sketch dim inside the symbol (if you draw it make the width the first dim and just use sketch constraints to centre vertical and horizontal, no text box).  If you dont need this line just comment it out by adding a ' at the start.
  • I wasnt sure exactly how you are getting the suffix so just remove the if then else statement and the & B6 bit if its already in the filename.

 

Cheers

 

Craig

 

 

Public Sub ShipTag()

    Dim invApp As Inventor.Application: Set invApp = ThisApplication
On Error GoTo ErrHandle:
Dim oDoc As Inventor.DrawingDocument: Set oDoc = invApp.ActiveDocument Dim oRefDoc As Inventor.Document: Set oRefDoc = oDoc.ReferencedDocumentDescriptors(1).ReferencedDocument invApp.ScreenUpdating = False Dim oSymbol As SketchedSymbol For Each oSymbol In oDoc.ActiveSheet.SketchedSymbols If oSymbol.Name = "ShipTag" Then Dim oSketch As DrawingSketch: Set oSketch = oSymbol.Definition.Sketch Call oSymbol.Definition.Edit(oSketch) Dim strRefDocName As String: strRefDocName = Left(oRefDoc.DisplayName, Len(oRefDoc.DisplayName) - 4) If oRefDoc.DocumentType = kAssemblyDocumentObject Then oSketch.TextBoxes(1).Text = strRefDocName & " B0" Else oSketch.TextBoxes(1).Text = strRefDocName & " B6" End If oSketch.DimensionConstraints(1).Parameter.Value = oSketch.TextBoxes(1).FittedTextWidth + 0.4 Call oSymbol.Definition.ExitEdit(True) End If Next invApp.ScreenUpdating = True ErrHandle: invApp.ScreenUpdating = True End Sub

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
0 Likes