AnsweredAssumed Answered

Open directory

Question asked by None None on Jan 9, 2015
Latest reply on Jan 9, 2015 by None None


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



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()


End Sub

Private Sub OpenLocation_Click()


End Sub


Solidworks 2015 SP1