2 Replies Latest reply on Jan 9, 2015 7:26 AM by None None

    Open directory

    None None

      Hello,

      Is it possible to open the directory where is just saved my files?

       

      Option Explicit

      Option Compare Text

       

      Dim swApp As SldWorks.SldWorks

      Dim Part As ModelDoc2

      Dim lErrors As Long

      Dim lWarnings As Long

       

      Sub CreateSTEP()

      Dim FileName As String

      Dim bRetVal As Boolean

       

      Set swApp = Application.SldWorks

      Set Part = swApp.ActiveDoc

      bRetVal = swApp.SetUserPreferenceIntegerValue(swStepAP, 214)

       

      FileName = Part.GetPathName

       

      FileName = Left(FileName, Len(FileName) - 7) & "W0"

       

      Me.LabelStatus.Caption = "Creating .STEP File"

      FileName = FileName & ".step"

       

      Me.LabelStatus.BackColor = vbRed

      Me.Repaint

       

      Part.SaveAs2 FileName, 0, True, False

       

      Me.LabelStatus.Caption = "Finished " & Me.LabelStatus.Caption

      Me.LabelStatus.BackColor = vbGreen

      End Sub

       

      Sub OpenLocation()

       

      'insert code here

       

      End Sub

      Private Sub ButCreateSTEP_Click()

      CreateSTEP

      End Sub

      Private Sub OpenLocation_Click()

      OpenLocation

      End Sub

       

      Solidworks 2015 SP1