I want to create a folder with commonly used functions so I don't have to copy them into each module.
Using RunMacro2 (2012 SOLIDWORKS API Help - RunMacro2 Method (ISldWorks) ) I can run a sub in another .swp file, but I don't see how to specify an input variable for a function and get the return value.
Am I thinking about this right? Or is there another convention in solidworks vba to do this, such as importing a .swp file into another .swp file?
Hi John,
You create a library of common functions in VB.NET or C# and then add this library as a reference to your VBA editor. here is a VIDEO.
Really cool thing about this approach is that you will have an intellisense in VBA editor.
Regards