AnsweredAssumed Answered

Is it possible to skip this screen when importing file?

Question asked by Mehmet Gultepe on Nov 2, 2016
Latest reply on Nov 2, 2016 by Mehmet Gultepe

I have a macro translate all the parasolid or step file in the same folder but my problem is, when run the macro every single time this screen pops and I have to click it. Is there any way to skip this?


Sub main()


    Set swApp = Application.SldWorks


    Path = "E:\TRANSLATE" + "\"


    sFileName = Dir(Path & "*.x_t") ' Change .x_t to any other extension you need.


    Do Until sFileName = ""


    boolstatus = swApp.LoadFile2(Path + sFileName, "")


    Set swModel = swApp.ActiveDoc


    PathSize = Strings.Len(Path + swModel.GetTitle)

    PathNoExtension = Strings.Left(Path + swModel.GetTitle, PathSize - 6)

    NewFilePath = PathNoExtension & "SLDPRT"

    longstatus = swModel.SaveAs(NewFilePath)



    swApp.CloseDoc swModel.GetTitle


Set swModel = Nothing


sFileName = Dir





End Sub