Forum Replies Created

  • Flyingaudio

    October 29, 2007 at 11:26 pm in reply to: batch render file naming question

    The changes I made to the included “Batch Render.cc” are included below:
    foreach (Sony.Vegas.Region region in myVegas.Project.Regions) {
    // need to strip off the extension’s leading “*”
    String regionFilename = String.Format(“{1}{2}”,
    region.Label,
    renderItem.Renderer.FileExtension.Substring(1));
    // Render the region

    The following error occurs after I execute the script and choose a format and pick a location.

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
    at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
    at System.String.Format(IFormatProvider provider, String format, Object[] args)
    at EntryPoint.DoBatchRender(ArrayList selectedTemplates, String basePath, RenderMode renderMode)
    at EntryPoint.FromVegas(Vegas vegas)
    — End of inner exception stack trace —
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at Sony.Vegas.ScriptHost.ScriptManager.Run(Assembly asm, String className, String methodName)
    at Sony.Vegas.ScriptHost.CodeDomScriptManager.Run()
    at Sony.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)

  • Flyingaudio

    October 29, 2007 at 11:48 am in reply to: batch render file naming question

    I am using Vegas 7 and tried the two modifications to “Batch Render” listed above, but the script always errors out. I created two copies and modified them. I went through my changes several time to confirm. I simply need the Region Name for the filename. What am I missing?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy