Sorry, that should say based on David's code which Damien posted in
this thread:

http://groups.google.co.uk/group/grasshopper3d/browse_thread/thread/6a38aa2f51daad3f/c8dddb96e5c715a3?hl=en

On May 12, 1:24 pm, Dan <danielpi...@yahoo.co.uk> wrote:
> To render multiple objects you need to actually deal with the list
> inside the code component.
> I wrote something based on Damien's code recently for this purpose :
>
> Sub RunScript(ByVal x As List(Of OnBrep), ByVal y As String)
>
>     Dim i As New Integer
>     Dim x_i As New OnBrep
>     Dim count As New Integer
>     count = x.Count()
>     Dim obj_list As New List(Of IRhinoBrepObject)
>     For i = 0 To count - 1
>       x_i = x(i)
>       Dim obj As IRhinoBrepObject = doc.AddBrepObject(x_i)
>       obj_list.Add(obj)
>       doc.Regen()
>     Next
>
>     Dim filename As String = "C:\wherever\whatever" & y & ".bmp"
>
>     app.RunScript("-_Render")
>     app.RunScript("-_SaveRenderWindowAs """ & filename & """")
>     app.RunScript("-_CloseRenderWindow")
>
>     For i = 0 To count - 1
>       doc.DeleteObject(New MRhinoObjRef(obj_list(i)), True, True)
>     Next
>
>   End Sub
>
> Okay, thats my little contribution, now what would be great is if
> someone could just put in a boolean toggle to switch it off so you can
> update without it trying to render every time.
>
> Dan
>
> On May 12, 12:44 pm, Taylor <delete2...@gmail.com> wrote:
>
> > hi..Can we make a key for rendering to stop when we want to change
> > something during the rendering?or I dont know where it is...?  One
> > more, this code will render N times when there are N things put into
> > the Geometry, but they should be in the same picture, no mater how I
> > merge them, graft them, still render n times...any good solution?

Reply via email to