Author Topic: How does Editor shows the message immediately?  (Read 6438 times)

0 Members and 1 Guest are viewing this topic.

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: How does Editor shows the message immediately?
« Reply #15 on: September 13, 2016, 11:06:59 PM »
What happens if you uncomment the ed.WriteMessage?

On Bricscad it works as expected, i.e. it writes to command prompt as well as increasing the progress meter.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.
- J.R.R. Tolkien

xys1995

  • Mosquito
  • Posts: 17
Re: How does Editor shows the message immediately?
« Reply #16 on: September 13, 2016, 11:24:10 PM »
Can't be listed one by one.

Chumplybum

  • Newt
  • Posts: 97
Re: How does Editor shows the message immediately?
« Reply #17 on: September 15, 2016, 01:50:58 AM »
I'm still unsure what you're trying to achieve... do you want the message to display the percentage complete in one line only, or display a new line for each percentage complete? Using environment.newline might be what you're after.

using this:
Code: [Select]
For counter As Integer = 1 To 100
            ed.WriteMessage("\n{0}", counter)
        Next

i get:
\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\...

using this:
Code: [Select]
For counter As Integer = 1 To 100
            ed.WriteMessage(String.Format("{0}count is {1}", Environment.NewLine, counter))
        Next

i get:
count is 1
count is 2
count is 3
count is 4
count is 5
count is 6
count is 7
count is 8
count is 9
count is 10
...

using this:
Code: [Select]
       
For counter As Integer = 1 To 100
            ed.WriteMessage(String.Format("{0}count is {1}", vbCr, counter))
        Next

you'll get a running percentage, but as mentioned previously you'll need to use 'DoEvents' so the command line can be updated