Running all the configurations with a macro
Running all the configurations with a macro
(OP)
With SWX Animator>Screen Capture, I would like to make an AVI file by running all the configurations one after the other to show the automation process. Is there any macro I can find?






RE: Running all the configurations with a macro
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
RE: Running all the configurations with a macro
Tanks, Anyway I'll give a try.
RE: Running all the configurations with a macro
RE: Running all the configurations with a macro
Flores
SW06 SP4.1
RE: Running all the configurations with a macro
2) Set window size as required.
3) Zoom out so that the model will not extend past the boundaries of the viewport in any of the configurations
4) Choose "screen capture", type in .avi name and choose SWX screen renderer.
5) Run the config iteration macro from the toolbar button you assigned in step 1.
6) Stop screen capture.
FYI, this is one way to make animations of bending of sheet metal and tubing, which has been requested here many times.
CODE
Const PAUSETIME = 0.01
Sub Main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim vConfNameArr As Variant
Dim sConfigName As String
Dim Start As Single
Dim i As Long
Dim bShowConfig As Boolean
Dim bRebuild As Boolean
Dim bRet As Boolean
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.ActiveDoc
Debug.Print "File = " + swModel.GetPathName
vConfNameArr = swModel.GetConfigurationNames
For i = 0 To UBound(vConfNameArr)
sConfigName = vConfNameArr(i)
bShowConfig = swModel.ShowConfiguration2(sConfigName)
bRebuild = swModel.ForceRebuild3(False)
Start = Timer
Do While Timer < Start + PAUSETIME
DoEvents ' Yield to other processes.
Loop
Debug.Print " Config = " & sConfigName
Next i
End Sub
RE: Running all the configurations with a macro
Flores
SW06 SP4.1