Is it possible to run VSTA macro, which is attached in the design binder, from a second VBA macro, using the RunAttachedMacro method?
Since the RunAttachedMacro takes the macro name, module name, and procedure name as parameters, I tried setting up my vsta macro like this:
Partial Class SolidWorksMacro
Public Sub main()
MsgBox("To dela")
End Sub
''' <summary>
''' The SldWorks swApp variable is pre-assigned for you.
''' </summary>
Public swApp As SldWorks
End Class
Module HandlerModule
Dim macro As New SolidWorksMacro
Public Sub main()
macro.main()
End Sub
End Module
Unfortunatly unsuccessful.

If you attach the macro, anyone who opens this part can run the attached macro. Otherwise, you have to provide the macro in a separate file.
– KraljMatjaz