Hello
I have 30 configurations I would like to have the exploded of all the versions.
Kind regards
Hello
I have 30 configurations I would like to have the exploded of all the versions.
Kind regards
Hello, I had to do the 30 one by one and I'm 30 more to do...
added configs with excel, cool
export with a macro' (when it's finished), cool
Making 30 exploded of the same assembly with configures it softens the brain.
Hello, once you have made the 1st explode, you can copy/paste your exploded into the other configurations.
And then change what you want in each burst.
Obviously, if all your bursts are different, it makes no sense to copy/paste.
But I don't answer your macro question...
Good luck, only 30 more to go!
Hello, I didn't succeed in copying and pasting
1- Ctrl+C, Ctrl+V
2- Drag the exploded view to the target configuration.
But in the sw help, type: "copy of exploded views".
This will no doubt be clearer.
Good evening
http://help.solidworks.com/2019/French/SolidWorks/sldworks/t_Copying_Exploded_Views_Overview.htm
Cdlt
Thank you
It's already better than nothing.
but it's not worth a Macro, I'm going to need it for several projects.
Currently the macro wants to make me travel and doesn't create the exploded view.
Hello
I hadn't noticed that you wanted to go through a macro.
It is possible to create a configuration derived from each configuration
See this example
http://help.solidworks.com/2019/English/api/sldworksapi/Add_Derived_Configurations_Example_VB.htm
On the other hand, I don't know if it's possible to import an already existing exploded in each configuration.
Yannick
Thank you
I use Excel for configurations.
AddConfiguration seems to me a good lead, maybe an option indicated.
Hello
The response of the hot line
Dim swAssembly As SldWorks.AssemblyDoc
swAssembly.CreateExplodedView
I did a rather conclusive test.
After some research I went on
Add Regular expolde Step (VBA)
This allows me to choose the parts, the direction and the distance
Here is the result:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.AssemblyDoc
Dim config As SldWorks.Configuration
Dim swMdl As SldWorks.ModelDoc2
Dim explStep As SldWorks.ExplodeStep
Dim num As Double
Dim comp As SldWorks.Component2
Dim var As Variant
Dim transDir As SldWorks.Edge
Dim angleDir As SldWorks.Feature
Dim obj As SldWorks.Component2
Dim steps As Variant
Dim nestedStep As SldWorks.ExplodeStep
Dim boolstatus As Boolean
Dim i As Long, j As Long
Dim errCode As Long
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set config = swModel.ConfigurationManager.ActiveConfiguration
Set swMdl = swModel
Call swModel.AutoExplode
Set explStep = config. GetExplodeStep(0)
config. DeleteExplodeStep (explStep.Name)
'Select the components to move
boolstatus = swModel.Extension.SelectByID2("FO2220 18104-01D_Odace 1TL_1-1@RegularExplodeStep", "COMPONENT", 0, 0, 0, True, 1, Nothing, 0)
boolstatus = swModel.Extension.SelectByID2("FO2253 Odace support PTM_18104-11A_-1@RegularExplodeStep", "COMPONENT", 0, 0, 0, True, 1, Nothing, 0)
'Select the axis of explode direction
boolstatus = swModel.Extension.SelectByRay(1, 1, 1, 1, 1, 1, 1, 1, 1, True, 2, 0)
'distance indexDistance side ...
num = 3.1415 / 3
Set explStep = config. AddExplodeStep2(0.2, 0, False, num, -1, True, False, True, errCode)
boolstatus = swModel.Extension.SelectByID2("FO2255 18104-14A_extremite Odace Styl support_1-3@RegularExplodeStep", "COMPONENT", 0, 0, 0, True, 1, Nothing, 0)
'Select the axis of explode direction
boolstatus = swModel.Extension.SelectByRay(1, 1, 1, 1, 1, 1, 1, 1, 1, True, 2, 0)
'distance indexDistance side ...
num = 3.1415 / 3
Set explStep = config. AddExplodeStep2(0.2, 2, False, num, -1, True, False, True, errCode)
Call swMdl.EditRebuild3
End Sub