Showing multi-line message in the command window

#1
Hi, I am writing a plugin for MS IntelliCAD using C# and the .net assemblies of MSIntelliCad.

I am unable to output a multi line message.

First of all a single line messageworks:

Code: Select all

var ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("Test");
The following code outputs "TestTest" which is fair enough

Code: Select all

var ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("Test");
ed.WriteMessage("Test");
So I try to add new line at the end

Code: Select all

var ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("Test" + Environment.NewLine);
ed.WriteMessage("Test" + Environment.NewLine);
This does not produce any message.

Is it possible and how to output multi-line message?

And another related question. The plugin makes some extensive calculations and I would like to write messages as the calculations run. What I have found is that messages are displayed only when the plugin command finished processing and not when the WriteMessage call is made. Is there a way to refresh the UI to show the messages beforehand? I have tried System.Windows.Forms.Application.DoEvents(); and also ed.UpdateScreen(); without success.

Thank you kindly
Geza