Grasshopper

algorithmic modeling for Rhino

forcing rhino to wait for a process to finish in the new VB component

I am updating a legacy VB component. The legacy component used the following rhutil. work around to avoid the rhino error window from appearing after 20 seconds by having rhino wait until the process ended:
 
Dim proc As System.Diagnostics.Process = System.Diagnostics.Process.Start(the_program)
      While proc.HasExited = False
        Rhutil.RhinoApp().Wait(100)
      End While
        proc.WaitForExit()
      proc.Close()

Anyone know a similar work around in the rhinoCommons VB?
Jeff

Views: 914

Replies to This Discussion

RhinoApp in RhinoCommon also has a Wait() method. It doesn't allow you to specify a 100 ms delay, but it will clear the message pump.

You can also try to pause the thread you're on:

Threading.Thread.CurrentThread.Sleep(100)

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hey, did you figure out where is the Rhutil conponents now with rhinocommon? I'm very confused. THanks

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service