Element7k,
Thanks for responding.
Yeah, saving the commands in the history list is how I build the macro. When I run the macro, I also add a save command to the end of it but when it saves the model, it doesn't include everything. When I open the saved model, it's missing ports, field monitors, and other things.
When I press save in the GUI after the macro runs, then it saves fine but when I have the macro do the saving, the file doesn't save properly. I think when the macro finishes it returns control to the GUI and it refreshes it somehow so it saves right. The problem is that in my application, I'm trying to bypass all the GUI commands and just run a macro, save the model, and close the program without any user interaction.
Thanks again.