Is it possible to run a macro file from another macro file?

Discussion in 'SolidWorks' started by SW Monkey, Aug 25, 2006.

  1. SW Monkey

    SW Monkey Guest

    I have a macro that I would like to run at the end of a macro. These
    are (2) different files (SWP) Is this possible?
     
    SW Monkey, Aug 25, 2006
    #1
  2. SW Monkey

    CS Guest

    Yes
    swapp.RunMacro("Path","Module","Procedure")
     
    CS, Aug 25, 2006
    #2
  3. SW Monkey

    SW Monkey Guest

    Thanks CS. I actually found that right after I posted. :)
     
    SW Monkey, Aug 25, 2006
    #3
  4. SW Monkey

    That70sTick Guest

    I have tried it. There actually were some bugs, macros running
    differently when fired from within anther program.
     
    That70sTick, Aug 26, 2006
    #4
  5. SW Monkey

    Tin Man Guest

    I run multpile macros from a macro from a macro all day long (3-4
    levels deep every time). I have never seen any problems with this.

    Problems I have seen are that SW Macros don't completely close after
    running and depending on the expected initial values to start the macro
    with next time...since SW macro's don't close out, you can get macro's
    starting with their last used value for a variable. The only way I've
    found around this is to explicitly define initial values for everything
    I can in macros I write. For a given macro, this process will be
    present whether this is the only macro run or this macro was called
    from another macro.

    Ken
     
    Tin Man, Aug 27, 2006
    #5
  6. SW Monkey

    fcsuper Guest

    Yes! Also, just for double checking, make sure you are calling out the
    correct sub routine title in the call parameters.

    Matt
     
    fcsuper, Aug 28, 2006
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.