I've been pretty busy the last two days, so sorry for the delay in
posting (we had a user meeting up here and yesterday Brian James and I
were going back and forth on a number of things).  Anyway, that code
should have more or less been what David sent to me a while ago.  I'm
not sure exactly where you got it, but would imagine that it should
have been working from where ever it was copy/pasted from (me for the
original definition or another definition that was posted somewhere).
Anyway, the issue (which it seams most of you guys have found out) is
that the file name itself is getting a little messed up because of the
double quotes (the Chr(34) thing) that are being put in.

The double quotes at the begining and end (the ones in the
SaveRenderWindowAs macro) are fine and necessary for any file with
spaces.  The double quotes in the filename are NOT okay, and it looks
extremely odd to me that they are their.  First off, double quotes are
invalid character names, so windows will not allow that file to be
saved at all.  Secondly, provided there was a space in the filename
(which in this case there isn't,  but..) the double quote in the
middle will cause Rhino to think that the path is done being specified
and it will try to save it even though it may not have the full file
name with the extension.

So take the Chr(34) statements in the filename out and everything
should be fine.  Again, sorry for the delay, and I think everyone got
to the heart of it without me.

Best,
Damien

On May 6, 11:42 am, Patrick <[email protected]> wrote:
> He guys
>
> for animation purposes I tried out a small VB script from Damien
>
>  Dim obj As IRhinoBrepObject = doc.AddBrepObject(x)
>     doc.Regen()
>
>     Dim filename As String = "D:\GH_Animation\frame" & Chr(34) & y &
> Chr(34) & ".bmp"
>
>     app.RunScript("-_Render")
>     app.RunScript("-_SaveRenderWindowAs "& Chr(34) & filename & Chr
> (34) )
>     app.RunScript("-_CloseRenderWindow")
>
>     doc.DeleteObject(New MRhinoObjRef(obj), True, True)
>
> I made it that Rhino is obviously rendering all images choosen from an
> animated slider connected to the component. It shows me "Image
> successfully saved as D:\GH_Animation\frame"4".jpg" in the command
> line but the destination folder remains empty!
>
> Can you help Damien?

Reply via email to