Hey guys,
I try to export a .STEP AP214 but it exports .STEP AP203
I hope you can help.
Code:
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.SetUserPreferenceDoubleValue(swStepAP, 214) 'should save as STEP214, but it does not
FileName = Part.GetPathName
FileName = Left(FileName, Len(FileName) - 7) & "V0" 'adds version number
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
Private Sub ButCreateSTEP_Click()
CreateSTEP
End Sub
Solidworks 2015 SP1
SolidworksApi macros