paul Posted March 19, 2009 Report Share Posted March 19, 2009 It seems that if you have Macro1 which places a value in %Newvar% (defined as a global variable), then calls Macro2 which displays the contents of this variable, this works only if Macro1 is set to wait until Macro2 completes. If you set Macro2 to run asynchronously, then Macro2 will recognize %Newvar% only if: - Macro1 saves text variables - Macro2 restores text variables - Macro2 uses %Newvar% as a global variable Is that how it's supposed to be? Quote Link to comment Share on other sites More sharing options...
Cory Posted March 19, 2009 Report Share Posted March 19, 2009 This is correct. When a macro dies it takes it's variables with it. I think I have a pretty good understanding now of the global/local nature of the variables work in MEP but I hadn't considered much the 'wait for macro to complete' not being enabled so I ran some tests. I thought one could define the variable in the called macro as global as a solution but the value is lost. I don't call macros in this way usually but you make a good point that this appears to make it impossible to pass variables from the parent macro when using this method. And it woul be dumb to have to jump thru the var save hoops. Maybe it's something you should 'request' from ISS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.