Dim swApp As Object Option Explicit Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim vConfNameArr As Variant Dim sConfigName As String Dim nStart 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 vConfNameArr = swModel.GetConfigurationNames For i = 0 To UBound(vConfNameArr) sConfigName = vConfNameArr(i) bShowConfig = swModel.ShowConfiguration2(sConfigName) bRebuild = swModel.ForceRebuild3(False) Dim FilePath As String Dim PathSize As Long Dim PathNoExtension As String Dim NewFilePath As String FilePath = swModel.GetPathName PathSize = Strings.Len(FilePath) PathNoExtension = Strings.Left(FilePath, PathSize - 6) NewFilePath = PathNoExtension + sConfigName & ".DXF" 'Export Flat Pattern bRet = swModel.ExportFlatPatternView(NewFilePath, 1) Next i End Sub