Hi all,
I have a simple script that puzzles me: test.rvb (326 Bytes)
The goal is to scan an image from within Rhino.
The script works well except that I always get a “Server busy” error.
Now the weird thing is that when you change the extension of the script to vbs and run it it works without the error.
What is different from how Rhino runs it? Is there a way to suppress the error?
Scripts run on the main thread. When you get to the image acquiring bit Rhino message pump probably doesn’t get messages, nor handled. When messages aren’t being pumped for a certain period Windows will pop up that message.
Not sure how to get around that. Probably spin off a thread in which you do the scan and in the main script periodically check if thread is done, combined with a call to RhinoApp.Wait (I think)
Oi… out of my league - I only ever type in the stuff - I don’t think rvb can handle threading but I may be making that up. in any case on the overall question… @dale- any idea?
Whow Dale, fantastic! This is exactly what I needed. Works just perfect. Thanks!
While on the subject I have just one little problem left which you might be able to point me in the right direction: The ShowAcquireImage method returns just bmp’s, but the filesize is way to high. I need jpg.