Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6013

Waiting for idle state after open

$
0
0

@SzaboLaszlo wrote:

Hi,

I have a small script what open 3dm file and save printscreen:
“Dim objRhino
Set objRhino = CreateObject(“Rhino5x64.Application”)
If Not (objRhino Is Nothing) Then
objRhino.Visible = True
Call objRhino.RunScript(”-Open $openPath\$filename “, 0)
Call objRhino.RunScript(”
-Zoom A E" , 0)
Call objRhino.RunScript("-ScreenCaptureToFile $viewPathP\$imgfilename.png enter" , 0)
WScript.Sleep 2500
Call objRhino.RunScript("
-Setview W T" , 0)
Call objRhino.RunScript("
-Zoom A E" , 0)
Call objRhino.RunScript("-ScreenCaptureToFile $viewPathT\$imgfilename.png enter" , 0)
WScript.Sleep 2500
Call objRhino.RunScript("
-Setview W L" , 0)
Call objRhino.RunScript("
-Zoom A E" , 0)
Call objRhino.RunScript("-ScreenCaptureToFile $viewPathL\$imgfilename.png enter" , 0)
WScript.Sleep 2500
Call objRhino.RunScript("
-Setview W R" , 0)
Call objRhino.RunScript("
-Zoom A E" , 0)
Call objRhino.RunScript("_-ScreenCaptureToFile $viewPathR\$imgfilename.png enter" , 0)
WScript.Sleep 2500
Call objRhino.RunScript("
-Save enter", 0)
Call objRhino.RunScript("
-Exit" , 0)
WScript.Sleep 2500
End If
Set objRhino = Nothing
";

But in some cases the image is blank. In possible the script is too fast & did not wait “Creating Meshes…” method after open. Has it any options to wait Idle state in rhino?

Thanks

Laszlo Szabo

Config: Rhino 5.14.522, Intel i7-6700, 16 GB RAM

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6013

Trending Articles