make envelope items standard components
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
make envelope items standard components
Is there a way to make envelope items standard components for all components in an Assembly, that has many components and subassemblies with many components? All files are currently enveloped.
Thanks,
Mark
Thanks,
Mark
AHAH! Try this!
I just tested it out and it works.
First of all, Make sure that everything is NOT hidden in your assembly first. There are no hidden components.
Then RMB on your top level and select "Hide all envelopes" Now, under your selection tool bar, select "Select Hidden" Them RMB on them and Select your properties and Envelope won't be greyed out.
Go to full postI just tested it out and it works.
First of all, Make sure that everything is NOT hidden in your assembly first. There are no hidden components.
Then RMB on your top level and select "Hide all envelopes" Now, under your selection tool bar, select "Select Hidden" Them RMB on them and Select your properties and Envelope won't be greyed out.
- AlexLachance
- Posts: 2221
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2412
- x 2056
Re: make envelope items standard components
I'm not sure I understand the question. What do you refer to as standard components?
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Just remove the envelope. Currently have to go in each subassembly and select all components ... then go to component properties, and un check the envelope. This customers assembly is huge, and everything is individually enveloped. Hoping there is is a way to select all assemblies with dependents and uncheck the envelope option on all. This is going to take a great deal of time manually!
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: make envelope items standard components
You should be able to do it with a macro, if there isn't an easier way.
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
So there is "sort of" a way.
If you use Assembly Visualization, you can add a column called "Excluded From BOM".
(by default, all envelope components are excluded from BOM).
Then you can sort by that column. Which puts all the envelope components at the top of the list.
Unfortunately, you cannot Multi-select and uncheck "Envelope" as it is greyed out as soon as you have more than 1 selected.
But, it will give you all the components right there in front of you.
I will look a little deeper to see if envelope can be toggled off on multiple things at once.
If you use Assembly Visualization, you can add a column called "Excluded From BOM".
(by default, all envelope components are excluded from BOM).
Then you can sort by that column. Which puts all the envelope components at the top of the list.
Unfortunately, you cannot Multi-select and uncheck "Envelope" as it is greyed out as soon as you have more than 1 selected.
But, it will give you all the components right there in front of you.
I will look a little deeper to see if envelope can be toggled off on multiple things at once.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
OK, what I found was that, if you multi select components and ALL the components that you have selected are ALL envelope, then you can toggle off envelope for all of them all at once.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Thanks Dan,DanPihlaja wrote: ↑Tue Aug 15, 2023 8:13 am So there is "sort of" a way.
If you use Assembly Visualization, you can add a column called "Excluded From BOM".
(by default, all envelope components are excluded from BOM).
Then you can sort by that column. Which puts all the envelope components at the top of the list.
Unfortunately, you cannot Multi-select and uncheck "Envelope" as it is greyed out as soon as you have more than 1 selected.
But, it will give you all the components right there in front of you.
I will look a little deeper to see if envelope can be toggled off on multiple things at once.
Yeah .. I can find a couple of ways to get them all selected .. but the option to toggle off the envelope has been greyed out each time so far. frustrating. seems like it should be such an easy thing. can help but feel like I am just missing the option somewhere, but can't find anything on google for this either.
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Thanks Matt .. I've been looking for one, but havent had any luck there either.mattpeneguy wrote: ↑Tue Aug 15, 2023 8:08 am You should be able to do it with a macro, if there isn't an easier way.
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
The problem for this assembly is there are many sub assemblies inside of sub assemblies, and they all of teh components have envelopes .. so the option is always greyed out. I am having to expand the entire assembly and manually select each component in order for it to not be grayed out.DanPihlaja wrote: ↑Tue Aug 15, 2023 8:16 am OK, what I found was that, if you multi select components and ALL the components that you have selected are ALL envelope, then you can toggle off envelope for all of them all at once.
image.png
image.png
looking for a a tool to "select all envelopes" so then I can uncheck that option .. but no luck there
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: make envelope items standard components
There's this from a quick google search on changing a part to an envelope part:
https://help.solidworks.com/2021/englis ... ple_vb.htm
You'd need to figure out which "True" to change to false and then wrap it in a loop to go through the assembly.
https://help.solidworks.com/2021/englis ... ple_vb.htm
You'd need to figure out which "True" to change to false and then wrap it in a loop to go through the assembly.
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Thanks Matt .. I found that one too .. but it doesn't actually go into all of the sub assemblies inside of other subassemblies to select all the components and then continue with all the components and all of their dependents. I don't know enough enough VBA to alter this unfortunately.mattpeneguy wrote: ↑Tue Aug 15, 2023 8:28 am There's this from a quick google search on changing a part to an envelope part:
https://help.solidworks.com/2021/englis ... ple_vb.htm
You'd need to figure out which "True" to change to false and then wrap it in a loop to go through the assembly.
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: make envelope items standard components
Here's further information:
https://help.solidworks.com/2019/englis ... ties6.html
Looks like it's the second to last true in the above link that needs to be changed to false:
https://help.solidworks.com/2019/englis ... ties6.html
Looks like it's the second to last true in the above link that needs to be changed to false:
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: make envelope items standard components
Here's the loop through assembly that will be the other part:
https://help.solidworks.com/2023/englis ... Redirect=1
The API help the people at SW provide is pretty darn good.
If I get some time today I may be able to kludge it together. But if you want something clean, @josh, @gupta9665, @artem, or one of the other actual programmers would have to weigh in.
https://help.solidworks.com/2023/englis ... Redirect=1
The API help the people at SW provide is pretty darn good.
If I get some time today I may be able to kludge it together. But if you want something clean, @josh, @gupta9665, @artem, or one of the other actual programmers would have to weigh in.
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Thanks for finding all of this Matt. I can sort of understand the individual bits of code and what they are doing, but I don't have the knowledge it would take to put this into a working macro. definitely beyond my abilities unfortunately.mattpeneguy wrote: ↑Tue Aug 15, 2023 8:42 am Here's the loop through assembly that will be the other part:
https://help.solidworks.com/2023/englis ... Redirect=1
The API help the people at SW provide is pretty darn good.
If I get some time today I may be able to kludge it together. But if you want something clean, @josh, @gupta9665, @artem, or one of the other actual programmers would have to weigh in.
Re: make envelope items standard components
FYI: There are 3 separate SPRs requesting the ability to select envelopes via Advanced Selection
SPR542629 - Cannot select assembly envelope components through the Advanced Selection criteria
SPR666548 - It should be possible to identify and select envelope components with advanced selection or with assembly visualization
SPR1059850 - Ability to select components which are excluded from BOM (Bill of Materials) and Envelope Components in Component Selection tools, and Advanced Selection
SPR542629 - Cannot select assembly envelope components through the Advanced Selection criteria
SPR666548 - It should be possible to identify and select envelope components with advanced selection or with assembly visualization
SPR1059850 - Ability to select components which are excluded from BOM (Bill of Materials) and Envelope Components in Component Selection tools, and Advanced Selection
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Great to know... I'll add my name to them too. ThanksJSculley wrote: ↑Tue Aug 15, 2023 8:54 am FYI: There are 3 separate SPRs requesting the ability to select envelopes via Advanced Selection
SPR542629 - Cannot select assembly envelope components through the Advanced Selection criteria
SPR666548 - It should be possible to identify and select envelope components with advanced selection or with assembly visualization
SPR1059850 - Ability to select components which are excluded from BOM (Bill of Materials) and Envelope Components in Component Selection tools, and Advanced Selection
- AlexLachance
- Posts: 2221
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2412
- x 2056
Re: make envelope items standard components
Can you provide some images please? I've never encountered enveloppes that couldn't be toggled off.
A bit more context would help in perhaps getting more solutions.
A bit more context would help in perhaps getting more solutions.
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
Yeah, that was the first thing that I checked. I remembered seeing this (below) and thought that this would do it, but it doesn't mean an envelope component. It means something else.JSculley wrote: ↑Tue Aug 15, 2023 8:54 am FYI: There are 3 separate SPRs requesting the ability to select envelopes via Advanced Selection
SPR542629 - Cannot select assembly envelope components through the Advanced Selection criteria
SPR666548 - It should be possible to identify and select envelope components with advanced selection or with assembly visualization
SPR1059850 - Ability to select components which are excluded from BOM (Bill of Materials) and Envelope Components in Component Selection tools, and Advanced Selection
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
He is trying to multi select envelope components to turn them off he has hundreds of them.AlexLachance wrote: ↑Tue Aug 15, 2023 9:15 am Can you provide some images please? I've never encountered enveloppes that couldn't be toggled off.
A bit more context would help in perhaps getting more solutions.
Unfortunately, if the components that you have multi selected aren't ALL envelope, then you cannot turn off envelope en-masse.
Also, I don't think that you can select multi-levels and turn them off en-masse either.
So, it sounds like a lot of work.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
You can see that the Envelope toggle box is greyed out here. Thats because in this assembly, and in a subassembly is a component that isn't in an envelope. so since there is something not in an envelope .. the option is greyed out. I need a way to select ONLY all assemblies and their dependents that are in an envelope so that I can toggle that option on all of those components. currently, I can find a way to do this without manually expanding each assembly and subassembly and selecting only the enveloped components and assemblies. this will take hours on this assembly becuase of its size. Im was thinking there might be an easier way .. but its looking like a macro might be the only way.AlexLachance wrote: ↑Tue Aug 15, 2023 9:15 am Can you provide some images please? I've never encountered enveloppes that couldn't be toggled off.
A bit more context would help in perhaps getting more solutions.
Re: make envelope items standard components
This will select all envelope components at any level. You should then be able to toggle envelope off.
Sub main()
Dim swapp As SldWorks.SldWorks
Dim swDoc As SldWorks.AssemblyDoc
Dim swComp As SldWorks.Component2
Dim vComps As Variant
Set swapp = Application.SldWorks
Set swDoc = swapp.ActiveDoc
vComps = swDoc.GetComponents(False)
Dim i As Long
swDoc.ClearSelection2 True
For i = 0 To UBound(vComps)
Set swComp = vComps(i)
If Not (swComp.IsEnvelope = False) Then
swComp.Select2 True, 1
End If
Next i
End Sub
Sub main()
Dim swapp As SldWorks.SldWorks
Dim swDoc As SldWorks.AssemblyDoc
Dim swComp As SldWorks.Component2
Dim vComps As Variant
Set swapp = Application.SldWorks
Set swDoc = swapp.ActiveDoc
vComps = swDoc.GetComponents(False)
Dim i As Long
swDoc.ClearSelection2 True
For i = 0 To UBound(vComps)
Set swComp = vComps(i)
If Not (swComp.IsEnvelope = False) Then
swComp.Select2 True, 1
End If
Next i
End Sub
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
AHAH! Try this!
I just tested it out and it works.
First of all, Make sure that everything is NOT hidden in your assembly first. There are no hidden components.
Then RMB on your top level and select "Hide all envelopes" Now, under your selection tool bar, select "Select Hidden" Them RMB on them and Select your properties and Envelope won't be greyed out.
I just tested it out and it works.
First of all, Make sure that everything is NOT hidden in your assembly first. There are no hidden components.
Then RMB on your top level and select "Hide all envelopes" Now, under your selection tool bar, select "Select Hidden" Them RMB on them and Select your properties and Envelope won't be greyed out.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
This works perfectly. Thanks for this solution Dan !!
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Thanks Josh ! This works perfectly !josh wrote: ↑Tue Aug 15, 2023 9:34 am This will select all envelope components at any level. You should then be able to toggle envelope off.
Sub main()
Dim swapp As SldWorks.SldWorks
Dim swDoc As SldWorks.AssemblyDoc
Dim swComp As SldWorks.Component2
Dim vComps As Variant
Set swapp = Application.SldWorks
Set swDoc = swapp.ActiveDoc
vComps = swDoc.GetComponents(False)
Dim i As Long
swDoc.ClearSelection2 True
For i = 0 To UBound(vComps)
Set swComp = vComps(i)
If Not (swComp.IsEnvelope = False) Then
swComp.Select2 True, 1
End If
Next i
End Sub
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
Really appreciate you all working thru the problem with me. Helped me quite a bit. Thank you all.
- AlexLachance
- Posts: 2221
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2412
- x 2056
Re: make envelope items standard components
Well, a solution was provided. If that one fails, then you can hide all and then toggle "show all enveloppes" and proceed to do a similar process.DanPihlaja wrote: ↑Tue Aug 15, 2023 9:29 am He is trying to multi select envelope components to turn them off he has hundreds of them.
Unfortunately, if the components that you have multi selected aren't ALL envelope, then you cannot turn off envelope en-masse.
Also, I don't think that you can select multi-levels and turn them off en-masse either.
So, it sounds like a lot of work.
Re: make envelope items standard components
It should probably be noted that selecting all envelopes (or any big bunch o’ components) and hitting the “Properties” box may change more than just the property you want. There’s no way to specify “Only change the envelope property”. This will also change suppression states, flexible/rigid, and maybe more.
Re: make envelope items standard components
Add following line before end sub to remove the envelope option for bulk. But please note that any component solve state, suppression, etc. wil change like @josh has stated.
swDoc.CompConfigProperties6 2, 0, True, True, swComp.ReferencedConfiguration, False, False, 0
But you can also replace
swComp.Select2 True, 1
with
swComp.CompConfigProperties6 swComp.GetSuppression2, 0, swComp.Visible, True, swComp.ReferencedConfiguration, False, False, 0
This will only change solve state and assembly save as part option. Rest properties will remain intact.
swDoc.CompConfigProperties6 2, 0, True, True, swComp.ReferencedConfiguration, False, False, 0
But you can also replace
swComp.Select2 True, 1
with
swComp.CompConfigProperties6 swComp.GetSuppression2, 0, swComp.Visible, True, swComp.ReferencedConfiguration, False, False, 0
This will only change solve state and assembly save as part option. Rest properties will remain intact.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
It shouldn't. It only changes the things that you specifically change. If you select it in the box. Has worked in the past before. Unless there is some thing that I have missed (which is always a possibility)josh wrote: ↑Tue Aug 15, 2023 10:20 am It should probably be noted that selecting all envelopes (or any big bunch o’ components) and hitting the “Properties” box may change more than just the property you want. There’s no way to specify “Only change the envelope property”. This will also change suppression states, flexible/rigid, and maybe more.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
Re: make envelope items standard components
You're right. It shouldn't. But it does. At least in 22sp4. I made 2 comps envelope, then suppressed one of them. Selected both, and changed back to non-envelope. The suppressed one became resolved. Did the same thing with a couple subassemblies and their rigid/flexible setting. Ended up with both set to rigid.DanPihlaja wrote: ↑Tue Aug 15, 2023 11:10 am It shouldn't. It only changes the things that you specifically change. If you select it in the box. Has worked in the past before. Unless there is some thing that I have missed (which is always a possibility)
- DanPihlaja
- Posts: 861
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 814
- x 991
Re: make envelope items standard components
Now that you mention it, when I was playing around with this fix, I noticed the same thing with regards to suppressed/unsuppressed state. (I am also using 2022 SP4). I didn't think anything of it at the time, thinking that maybe it was a fluke.josh wrote: ↑Tue Aug 15, 2023 11:31 am You're right. It shouldn't. But it does. At least in 22sp4. I made 2 comps envelope, then suppressed one of them. Selected both, and changed back to non-envelope. The suppressed one became resolved. Did the same thing with a couple subassemblies and their rigid/flexible setting. Ended up with both set to rigid.
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
- AlexLachance
- Posts: 2221
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2412
- x 2056
Re: make envelope items standard components
It does that in 2019 also.josh wrote: ↑Tue Aug 15, 2023 11:31 am You're right. It shouldn't. But it does. At least in 22sp4. I made 2 comps envelope, then suppressed one of them. Selected both, and changed back to non-envelope. The suppressed one became resolved. Did the same thing with a couple subassemblies and their rigid/flexible setting. Ended up with both set to rigid.
- Bradfordzzz
- Posts: 235
- Joined: Tue Mar 16, 2021 6:26 am
- Location: Windsor, ON
- x 335
- x 209
Re: make envelope items standard components
It did the same for me ... but in my case it didnt really matter. But its a good thing to be aware of for sure!josh wrote: ↑Tue Aug 15, 2023 11:31 am You're right. It shouldn't. But it does. At least in 22sp4. I made 2 comps envelope, then suppressed one of them. Selected both, and changed back to non-envelope. The suppressed one became resolved. Did the same thing with a couple subassemblies and their rigid/flexible setting. Ended up with both set to rigid.