Spurs
Mechanical
- Nov 7, 2002
- 297
I have recorded the following macro in which I added a part called "Face.SLDPRT" at the origin in an open blank assembly file.
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
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Part.AddComponent "C:\Face.SLDPRT", -0.001940447873138, 0.005483874424086, -0.01049999999998
End Sub
When I open the blank file a 2nd time and run the macro, nothing happens.
The assembly file and part file are in the same directory.
Any suggestions as to what is wrong?
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
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Part.AddComponent "C:\Face.SLDPRT", -0.001940447873138, 0.005483874424086, -0.01049999999998
End Sub
When I open the blank file a 2nd time and run the macro, nothing happens.
The assembly file and part file are in the same directory.
Any suggestions as to what is wrong?