Visual Basic/SolidWorks running a SW macro from VB
Visual Basic/SolidWorks running a SW macro from VB
(OP)
I would like to run a SolidWorks macro from VB. Does anyone have an example? The drawing I want to modify is already running and the macro is saved in app.path. When
I try to implement the macro within VB it does not work. I just need a way to call it from VB.
Thanks,
Josh
I try to implement the macro within VB it does not work. I just need a way to call it from VB.
Thanks,
Josh






RE: Visual Basic/SolidWorks running a SW macro from VB
Thanks
Josh
RE: Visual Basic/SolidWorks running a SW macro from VB
RE: Visual Basic/SolidWorks running a SW macro from VB
At first I was unable to run the code from my visual basic program, but I made some modifications so it would run
in the program and not just in the SolidWorks API environment.
Thanks
Josh
RE: Visual Basic/SolidWorks running a SW macro from VB
Thanks
Josh
RE: Visual Basic/SolidWorks running a SW macro from VB
Dim swApp As Object
Dim Part As Object
Dim Gtol As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()
' Start the application and activate it
MyAppID = Shell("J:\@Engineering Central\Common\Applications\SolidWorks\Executables\Titleblock.exe", 1)
End Sub
Bradley