Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly Ballons - How does it number them? 1

Status
Not open for further replies.

phreaq

Mechanical
Mar 2, 2005
99
0
0
CA
When ballooning an assembly, it seems SW balloons them in the order they were inserted into the assembly, starting from 1.

Is this info stored anywhere? How does it know what was inserted first?

It probably just goes down the feature tree, and assigns an incremental value for each unique part. Is this correct?

I am trying to link the balloon number with an external db, and haven't quite grasped how to do it.

Any thoughts or comments would be appreciated.

phreaq
Has anyone seen my brain today? (^_^)
 
Replies continue below

Recommended for you

The Item Numbers relate to the BOM order. The BOM can be related to the FM order or it can be re-oredered to suit.

[cheers]
Helpful SW websites faq559-520​
How to find answers ... faq559-1091​
SW2006-SP5 Basic ... No PDM​
 
If you want to renumber the balloons to be in a better order, such as top of sheet down, you can re-order the balloons. Pick the table > BOM Contents and the Bill of Materials Properties box will pop up. Pick an item, make sure it is the blank far-left column in a row, then pick the "Row down" or "Row up" button.

SW06 SP5.0

Flores
 
phreaq said:
When ballooning an assembly, it seems SW balloons them in the order they were inserted into the assembly, starting from 1.

Is this info stored anywhere? How does it know what was inserted first?
This info must be stored somewhere otherwise SolidWorks would not know what components made up an assembly. While I do not claim know the internal make up, I can surmise that everytime a component is added to an assembly, it gets added to the bottom of an internal component list. I can demostrate this with the following macro.

Code:
Dim swApp As Object
Dim swModel As Object
Dim swComponent As Object
Dim swChild As Object

Dim Children As Variant
Dim Child As Variant

Sub main()

    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swComponent = swModel.GetActiveConfiguration.GetRootComponent
    
    Children = swComponent.GetChildren
    
    For Each Child In Children
    
        Set swChild = Child
        
        Debug.Print swChild.Name2
        
    Next

End Sub

1) Create a simple assembly of three parts.

2) Run the macro (the immediate window must be displayed in order to see the output; press ctrl+g to display it).

3) Note the order of the components.

phreaq said:
It probably just goes down the feature tree, and assigns an incremental value for each unique part. Is this correct?
No, it is more complicated than that as I will demostrate.

1) In the 3 part assembly you created, re-arrange the components in the Feature Manager Tree to a different order.

2) Run the macro.

3) Note the component order. It is the same as the first time the macro was run. This is why (I believe) you sometimes must go into the table properties of a BOM and click the follow assembly order button.

To actually see the order change, you must modify the macro as shown in green.


Code:
Dim swApp As Object
Dim swModel As Object
Dim swComponent As Object
Dim swChild As Object

[COLOR=green]Dim swFeature As Object[/color]

Dim Children As Variant
Dim Child As Variant

Sub main()

    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swComponent = swModel.GetActiveConfiguration.GetRootComponent
    
    Children = swComponent.GetChildren
    
    For Each Child In Children
    
        Set swChild = Child
        
        Debug.Print swChild.Name2
        
    Next
    
[COLOR=green]    Debug.Print
    
    Set swFeature = swModel.FirstFeature
    
    Do Until swFeature Is Nothing
    
        Debug.Print swFeature.Name
        
        Set swFeature = swFeature.GetNextFeature
    
    Loop[/color]

End Sub
If you run this code on the 3 part assembly that you mixed up the original order on, you will see that the output from the swChild.Name2 loop matches the order the componenets were added in the assembly and the output from the swFeature.Name loop matches the order of the components in the Feature Manager Tree. I hope this helps answer you first two questions.

phreaq said:
I am trying to link the balloon number with an external db, and haven't quite grasped how to do it.
Sorry, cannot help you here, I do not understand what you are trying to do

phreaq said:
Any thoughts or comments would be appreciated.
phreaq
Has anyone seen my brain today? (^_^)
I will not comment on your last question. [smile]


SA

 
Status
Not open for further replies.
Back
Top