Call a macro from another macro?

Oct 13, 2004 6 Replies

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.

Try this one:

SldWorks.RunMacro "", "", ""

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

/Anders

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:

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.

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required