Call a macro from another macro?

Loading thread data ...

You can shell to it if it is an executable, but the only other way I know to do that is via a macro feature.

Reply to
Evan T. Basalik

Try this one:

SldWorks.RunMacro "", "", ""

Search SolidWorks API Help for: 'SldWorks::RunMacro'

/Anders

Reply to
bagarnx

Thanx - Looks like just what I need!

Reply to
What-a-Tool

from API help: retval = SldWorks.RunMacro ( filePathName, moduleName, procedureName )

I've tried this, but I don't like it. The few attempts I've made, there were problems with forms and class modules not initializing properly.

What-a-Tool wrote:

Reply to
That70sTick

Tried it calling a macro with 5 modules and 3 forms - seemed to work great. This is just what I wanted to consolidate a few macro's I have with one interface to call any of them, without having to heap any more code into a single macro.

Reply to
What-a-Tool

i know this is an old thread, does the parent macro save the variable definitions of the child (called) macro, even after the child macro completes its program?

--

formatting link

Reply to
Smcelr2

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.