POV-Ray : Newsgroups : povray.programming : Executing POV from Visual Basic : Re: Executing POV from Visual Basic Server Time
3 May 2024 06:45:53 EDT (-0400)
  Re: Executing POV from Visual Basic  
From: clipka
Date: 26 Jun 2009 14:25:00
Message: <web.4a45124fe18746bda745f7570@news.povray.org>
"Orionis" <gia### [at] boxideeit> wrote:
> Ideally, I should call something like this:
>
> call POV_Render ('filename.pov', myPictureHandle, [VB6 process ID],
> [resolution/AA])
>
> I accept any comment, thanks

POV-Ray itself does not come with a VBA-compatible API (nor do I know of any 3rd
party "glue-code").

You will have to make a call to the Windows API to run the povray binary,
passing the .pov filename and the name for a temporary output file as command
line parameters; same for resolution and AA options and the like. You should
also specify the "/EXIT" command line parameter, and make sure POV-Ray is
configured to allow for multiple instances. You'll then have to wait for
POV-Ray to terminate, and then read in the temporary output file.

I don't expect anyone to ever come up with a closer integration of POV-Ray 3.6
into VBA (other than maybe writing a VBA wrapper to do the above). Maybe the
more modular architecture of POV-Ray 3.7 will lead to development of more
elegant APIs for some frameworks such as COM, ActiveX or .NET, which could act
as an alternative front-end from POV-Ray's perspective.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.