rgrayclamps
Mechanical
- Aug 6, 2004
- 376
I have experirence in both SolidWorks (2004 sp4.0) and VB.net, But I never tried SolidWorks API. Could someone shed some light on it? For example, how do I launch and open a SolidWorks document? I copied the following codes from a SolidWorks Journal file, but it does not work in VB.net.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
swApp = Application.SldWorks
Part = swApp.OpenDoc6("N:\New Vault\_Checkin\P-00000484.SLDDRW", 3, 0, "", longstatus, longwarnings)
Part = swApp.ActivateDoc ("P-00000484 - Sheet1")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
swApp = Application.SldWorks
Part = swApp.OpenDoc6("N:\New Vault\_Checkin\P-00000484.SLDDRW", 3, 0, "", longstatus, longwarnings)
Part = swApp.ActivateDoc ("P-00000484 - Sheet1")
End Sub