Obtaining input from the session window with a Global macro
In the previous recipe, the macro used a fixed specification limit of 12.5
. Here, we will add commands to ask for the specification and then group the points on the time series plot. This grouping is used to color points based on whether they are inside or outside the specification.
Allowing input from the session window can be helpful when running a macro. This can be a great way to add some flexibility to the macro. This uses the Set
command to ask for input from the session window.
Note
We can only use the Set
command to read from the session window if commands are enabled. If the MTB> is not showing in the session window, re-enable this by going to the Editor menu and selecting Enable ...
Get Minitab Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.