By Adam Nagy
I'm using WriteMessage() in a longer command and would like to keep the user updated by writing messages to the command window. Unfortunately, when I use WriteMessage(), its content only appears once my command finished. How could I update/refresh the Command Window to show the text I wrote?
If you add a carriage return (C# \n, VB.NET vbCr/vbCrLf) to the end of your text then it will appear straight away. As mentioned in the comments section, VB.NET vbCr might not work as well as vbCrLf does.
static public void AEN1WriteInfo()
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.
for (int i = 0; i < 3; i++)
// carriage return at the end
ed.WriteMessage(i.ToString() + "\n");