Building macros on the fly?

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
rlbrown3
Posts: 1
Joined: Tue May 22, 2012 5:39 pm

Building macros on the fly?

Post by rlbrown3 »

I am trying to recall, but it seems to me that one could build macros for MLwiN on the fly. Meaning, that all commands provided to MLwiN could be written to a file for editing and use as a macro. If this is correct, are commands written when one interacts with the equation window? I am publishing a paper and need to show the code for the models I have built, but do not want to do this graphically (pictures of the various windows). Thanks.

Roger
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Building macros on the fly?

Post by ChrisCharlton »

We have recently been trying to make sure that everything in the graphical interface has a command equivalent, so if you spot anything that should do but doesn't please let us know. To see the macro commands as they are generated you can open the Data Manipulation->Command Interface window and untick "user". You can then select one or more commands from this window and use the Control-C combination to copy the commands to the clipboard, from where they can be pasted into either the built-in macro editor or the text editor of your own choice. This process is described in detail in chapter 8 of the MCMC manual.

You will probably want to edit the generated commands once you have copied them in as the code generated isn't always as readable as if it was written by a human, for example a generated command might list columns c1 c2 c3 c4 whereas a human might have chosen to refer to them as c1-c4 or to use assigned column names rather than numbers. You will also notice a lot of generated commands that will not be necessary for your macro, for example the GUI often automatically issues WSET commands to refresh the displayed windows.
Post Reply