Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Dissolving Multiple Sub-Assemblies??? 2

Status
Not open for further replies.

Ebbie22

Mechanical
Oct 24, 2007
29
Is there any way to dissolve multiple sub-assemblies at once? I’m getting sick up dissolving them one by one. I know you could probably write some kind of Macro but I don’t have a clue where to even start with that, so if anyone has one for this particular issue and wouldn’t mind sharing it with me that would be great too!
 
Replies continue below

Recommended for you

How many multiple assys are there?

Are they all the same?

Are they patterned?
 
I might have anywhere from 5 to 50 Sub-Assemblies that need to be dissolved. Sometimes there the same description and sometimes they are different. In this case they aren’t part of a pattern.

I’m not sure how everyone adds hardware or even if they add hardware to their models but we add in all of our nuts, bolts, etc to make sure there’s absolutely no interferences. So what we have are like 8 to 10 preset bolt Sub-Assemblies. Each Bolt Sub-Assembly is a different combination (Bolt & Nut or Bolt, Nut, & Washer, etc) Once are final assembly is complete we add hardware to the model. If the parts were created as patterns obviously we can add are one Bolt Sub-Assembly & dissolve then pattern with no problem. But in some cases, the holes couldn’t be part of a pattern and we would have to assemble in our hardware individually, which leaves me with my 5 to 50 Sub-Assemblies to dissolve…
 
To (not) answer your question, I don't know of a way to do multiple dissolves. A API macro probably could.

It doesn't help you right now, but for future reference, perhaps you should dissolve as you go. A keyboard shortcut can be created to help speed the task.

Could the fastener sub-assys be left as is, and treated as a kit when read from the BOM? Effectively treat it as a sub-assy in it's own right. Whoever is responsible for ordering or picking the kit would include all the associated parts. A previous company I worked for used their MRP to deal with exactly that situation.
 
I figured the only way would be a Macro but I wasn’t sure…

If someone has a macro they wouldn't mind sharing for this issue that would be great otherwise I'll try to figure it out when I have time.

Thanks in advance...
 
Ebbie22,

Do you use Feature Driven Patterns for populating your fasteners? If not, you need to look into the command, it will be a huge time saver for you.

I do not do asm stacks for fasteners, but use feature driven patterns to quickly populate a fastener stack through the asm.

Search SW Help for 'Feature Driven Pattern'

Also are you using SmartMates? Read up on this in the SW Help if you do not use them. Search for 'SmartMates'

Cheers,

Anna Wood
SW2008 SP5.0, Windows Vista SP1
IBM ThinkPad T61p, T7800, FX570M, 4 gigs of RAM
 
Why do you need to dissolve the subassemblies at all?

-handleman, CSWP (The new, easy test)
 
AnnaWood,

I do use patterns to some extent. Where I experience most of my issues are the odd spacing that wouldn’t be part of a pattern. That’s where I put in my 5 to 50 fasteners individually.

Handleman,

Within our 8 to 10 fastener sub-assemblies groups we have are bolt, washer, & nut or a bolt, washer, washer, & nut and so on. Each sub-assembly is set up with a mate reference for assembling on our upper level assemblies & each is set up with a distance mate “bolting distance”. Also each bolt, washer, nut, bolt sleeve, etc have their own configurations within themselves for different lengths or sizes etc…

Now let’s say I’m on my upper level assembly and I need a bolt nut comb… so I assembly that in… Now, the distance between the surface where the bolt sits on and where the nut should sit on is .50”… So my next step would be to change my configs to the correct sizes for the particular hole I assembled my hardware in and change that “bolting distance” mate to .50”. ( I forgot to mention that I have these in a Design Library) So anyway, now that I have my bolt nut comb set I have to dissolve it before I pattern and when I do that I save it so I can hold those references for next time I add the particular size bolt nut comb. Ok so I pattern that hardware where I can. Now I have to fill in the areas that weren’t part of the pattern, so I just drag and drop the bolt nut combs (which should be correct since I saved it from before). This is where I have start dissolving my 5 to 50 sub assemblies I talk about. The reason these need to be dissolved is because my next bolt nut comb bolting joint may need a long bolt or a larger size. If you don’t dissolve them, when you change the configuration it will obviously change in all assemblies with the same name.

Hopefully what I said makes sense a little better now…

Thanks All for your feedback!
 
If you don't dissolve them, when you change the configuration it will obviously change in all assemblies with the same name.

Nope. You can have multiple instances of a sub-assembly with each instance being in a different configuration. But maybe I misunderstood what you're saying.
 
Give this a shot. Select any number of subassemblies in the feature tree and run the macro. Selected subassemblies will be dissolved. Anything that is selected that is not a subassembly (parts, planes, features, patterns, etc) will be ignored.

A couple of informational things regarding nested subassemblies:

If you select subassembly "b" inside subassembly "a" of your main assembly, "b" will dissolve into "a", but "a" will remain as a subassembly in your main assembly.

If you select subassembly "a" which contains subassembly "b", subassembly "a" will be dissolved, bringing "b" into the main assembly.

Code:
Dim swApp As SldWorks.SldWorks
Dim swDoc As SldWorks.ModelDoc2
Dim swAssy As SldWorks.AssemblyDoc
Dim swSelMgr As SldWorks.SelectionMgr
Dim swComp As SldWorks.Component2
Dim myCompCollection As New Collection
Dim Info As String
Dim i As Long

Sub main()

Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
If swDoc.GetType <> swDocASSEMBLY Then
    MsgBox "This macro only works in assemblies."
    Exit Sub
End If
Set swAssy = swDoc
Set swSelMgr = swDoc.SelectionManager
For i = 1 To swSelMgr.GetSelectedObjectCount2(-1)
    If swSelMgr.GetSelectedObjectType3(i, -1) = swSelCOMPONENTS Then
        Set swComp = swSelMgr.GetSelectedObject6(i, -1)
        If UBound(swComp.GetChildren) > 0 Then
            myCompCollection.Add swComp
        End If
    End If
Next i

swDoc.ClearSelection2 True
Info = ""
For i = 1 To myCompCollection.Count
    Set swComp = myCompCollection(i)
    swComp.Select4 False, Nothing, False
    Info = Info & "Successfully Dissolved " & swComp.Name2 & ": " & swAssy.DissolveSubAssembly & vbCrLf
Next i
    
Set myCompCollection = Nothing
If Info = "" Then Info = "No subassemblies were selected"
MsgBox "Subassembly dissolve results: " & vbCrLf & vbCrLf & Info
End Sub

-handleman, CSWP (The new, easy test)
 
Handleman,

Thanks for your help, it works perfect!!! This will defiantly save on our project time in the future.

Thanks Again,
Todd
 
Feature driven patterns don't need a 'pattern' to work. You just have to have a hole wizard made hole and it will populate all of the instances in that feature.

You populate one hole with all of the fasteners. Then you select feature driven pattern and select the fasteners and the driving feature, which is your hole wizard hole. It will populate every where you made a hole with that specific hole wizard hole. Now if you change a hole location, you don't have to change the fasteners, they will automatically follow that hole because it was part of the feature.

I found this command about a year ago and have used it ever since. It's really nice when you actually have linear patterns that end up changing. Now you don't have to change all of those other patterns in the assembly when ever the base pattern changes.
 
Ebbie22,
I second DEddie's comment (really Anna's). It is a big time saver and it will reduce your total # of mates in a given assembly. This should help with performance issues.

-Dustin
Professional Engineer
Certified SolidWorks Professional
Certified COSMOSWorks Designer Specialist
Certified SolidWorks Advanced Sheet Metal Specialist
 
DEddie & ShaggyPE,

I already use the feature you talk about. It helps but in some locations I can’t populate that hardware in some of those holes. It all depends what else is bolting up to those holes, cause I might need to use a long bolt or might need to add washers etc. Like I was saying above, I can put in the majority of my hardware but there’s always those few areas where I can’t…

Thanks all for you feedback!
 
That's where having mate references comes in handy. It will speed up putting in additional hardware. Did you know that you can skip instances in the Feature Driven Pattern?

Basically you tell the initial Feature Driven Pattern where you want to put in different hardware and it won't populate those holes. You could then do another FDP with the new hardware and tell it to skip the holes you already have populated. Not sure if this will help or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor