I want to create a macro which renders a view and then saves it as several sifferent filetypes.
I use swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e[theFormat] in order to define the requred file type to save.
I put this in the following code where TypeSelected is an array of strings containing the required file types to render.
The problem is that for each filetype to render, PV360, rerenders everything - this is time consuming!
I want to render ONCE and then only change the saveAs method.
How can I make this happen?
Render once but save with as many file formats as I want without rerendering?
The code to render and save is:
For iType = 0 To UBound(fileTypeSelected, 1)
Debug.Print ("Saving " & fileTypeSelected(iType) & " format")
Select Case fileTypeSelected(iType)
swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_JPEG
swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_JPEG2000_16bit
swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_PNG
swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_PNG_16bit
status = swRayTraceRenderer.RenderToFile(lOutFile, 0, 0) ' Render
Why not render to the highest quality format (PNG presumably) and then convert that file to the other formats?
This is trivial in .Net but should be fairly straightforward in a macro as well.
Retrieving data ...