1 Reply Latest reply on Apr 17, 2014 10:05 AM by Simon Turner

    Render Multiple file types

    Dan D

      Hi

      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)

                       Case "JPEG"

                         swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_JPEG

                       Case "JPEG2000_16bit"

                         swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_JPEG2000_16bit

                       Case "PNG"

                         swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_PNG

                       Case "PNG_16bit"

                         swRayTraceRenderOptions.ImageFormat = swRayTraceRenderImageFormat_e.swImageFormat_PNG_16bit

                     End Select

                    

                     status = swRayTraceRenderer.RenderToFile(lOutFile, 0, 0)      ' Render

                  Next