cnorton4
28th April 2008, 02:59 PM
I've been trying to learn how to write MiniTab macros with a little success. My question is... Does anyone have a good resource for learning how to write macros in MiniTab? I've read all the available help from MiniTab help but it is very basic and not real detailed.
Allattar
29th April 2008, 10:43 AM
Heres a simple way to write a macro in Minitab.
Open Minitab and go to the Calc menu, find random data, and normal distribution.
Enter something like 100 rows, where it asks to store results type c1 (alternatively type a name for a column to be created), and give it an average of 10, standard deviation we can leave at 1.
Next go to the graph menu, find the histogram, choose one of the options, say with a distribution fit.
Enter the column with the random data into the histogram dialogue box and click ok.
This should create a simple histogram.
Find the project manager toolbar and look for the history folder. If you cant find the button for it press CTRL+ALT+H.
You should have the commands used to create the random data and the histogram saved here.
Copy these commands, and paste them into notepad.
Enter above those commands on line one GMACRO, on line 2 a name for your macro, and after those commands ENDMACRO.
It should look like this
GMACRO
MYFIRSTMACRO
Random 100 c1;
Normal 0.0 1.0.
Histogram C1;
YFrequency;
Bar.
ENDMACRO
Next save this file, make sure in notepad it is set to all files. If you dont do this notepad saves it as txt. Save the file in to the macro folder inside the Minitab directory. Make sure you save it there to make it easy to use.
Then go back to Minitab, in Minitab call up the command line editor using CTRL+L. In the command line editor type % and the name you saved your macro as.
eg:
%MYFIRSTMACRO
When you run the commands it should generate a column of random data and create a histogram.
Ok this is a very basic way of creating a macro, they can do more, but hopefully it provides a start.
S Johnson
17th June 2008, 11:08 PM
I got a Minitab tutorial off of eBay and its pretty good. It was only $10 and I am learning stuff that SSBB in my office don't know how to do, such as macros. Just search on eBay for Minitab Tutorial Package. The seller is netscore (I guess I must include the boilerplate message that I am not the seller). Definitely worth $10. It won't make you an expert at Minitab macros, but it will get you started.