Subject:ISfFileHost - SaveAs (2)
Posted by: korigan
Date:4/7/2005 12:51:56 AM
Hello, I've got all my parameters for "SaveAs" function, but I get the following error message : "An error occured while saving one or more files. The file being redered has exceeded the maximum size allowed for the selected format". When I do it by hand everything is ok. But as soon as I use the following script (doing exactly the same thing than by hand ) the error message appears. My function is the following : fileWindow.SaveAs( "Mess.wav", "Wave (Microsoft)","Default Template", 0 ); Thanks for help |
Subject:RE: ISfFileHost - SaveAs (2)
Reply by: jetdv
Date:4/7/2005 6:51:52 AM
Try this: // Set the renderer to the Microsoft WAV renderer ISfRenderer rend = app.FindRenderer("Microsoft (Wave)", "WAV"); // Get the "default" template for the specified renderer ISfGenericPreset preset = rend.GetTemplate(0); // Save the file with the specified renderer and template fileWindow.SaveAs("c:\\Mess.wav", rend.Guid, preset, 0); The code above will set the renderer and preset properly for the SaveAs command. Also, the "filename" must be a fully qualified file name as I have changed it to above. You can change the path as needed. |
Subject:RE: ISfFileHost - SaveAs (2)
Reply by: korigan
Date:4/7/2005 7:04:11 AM
Thanks for your help. In fact my file name wasn't fully qualified. Now everything works fine. |