I wrote a very simple script (actually my first transit from macros to scripts) to render specific viewports. It should let you pick a folder and render the views into it named accordingly.
Problem occures when using a folder that contains spaces. Forums say put your strings in quotes but how do I quote a string in a variable?
Option Explicit Call RenderVisu() Sub RenderVisu() Dim folder folder = Rhino.BrowseForFolder If IsNull(folder) Then Exit Sub Dim answer answer = Rhino.MessageBox(folder, 1) If answer = 2 Then Exit Sub Rhino.Command "_-SetActiveViewport 01_TOP" Rhino.Command "_Render _-SaveRenderWindowAs " & folder & "01_TOP.png" Rhino.Command "_CloseRenderWindow" Rhino.Command "_-SetActiveViewport 02_BOTTOM" Rhino.Command "_Render _-SaveRenderWindowAs " & folder & "02_BOTTOM.png" Rhino.Command "_CloseRenderWindow" Rhino.MessageBox("Done") End Sub
Thanks in advance