/// <summary>
        /// Executes the macro in one go rather than line by line.
        /// </summary>
        public override void RunComplete()
        {
            FileSystem.File tempFile = FileSystem.File.CreateTemporaryFile("mac");
            tempFile.WriteTextLines(_lines);

            _powerSHAPE.DoCommand("MACRO RUN \"" + tempFile.Path + "\"");

            // Wait for the macro to finish
            System.Threading.Thread.Sleep(1000);
            while (_powerSHAPE.IsBusy())
            {
                System.Threading.Thread.Sleep(1000);
            }

            tempFile.Delete();
        }