Import Project from XML in Vegas Pro – Part 1

In this tutorial we start looking at how to import multiple XML files into a single project. When importing XML in VEGAS, it always wants to import each file into a new project. So we learn how to parse the XML file and figure out how to import multiple projects. In this first part, we learn how to select the multiple XML files to be imported.

Please sign up here and leave comments with suggestions of tasks you would like to see automated. You can help guide the direction of these videos. Also, please subscribe to my YouTube channel.

2 thoughts on “Import Project from XML in Vegas Pro – Part 1”

  1. Edward,
    I’m trying to replicate your “Script with Forms” tutorial posted 2 years ago. I’m using Visual Studio 2022 (ver. 17.7.3, .NET Framework 4.8.04084) and Vegas Pro 18 (build 527). As a test I’m trying to set FadeIn/Out.Length for a existing TrackEvent.

    Very strange things happen:
    1. If I open the Form with Form.Show() it allows me to GET ANY Vegas.Project/Event information (Vegas version, Project name, Event start, etc.) but on SET command returns an error:

    Unhandled exception on main thread: System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
    at ScriptPortal.Vegas.IEventCOM.SetFadeLength(UInt32 trackID, Int64 eventID, OwnerType ownerType, Int64 length)
    at ScriptPortal.Vegas.Fade.set_Length(Timecode value)
    at VegasScript.frmTest.btnSet_Click(Object sender, EventArgs e) in D:\Greg\VSProjects\VegasScriptUI\frmTest.cs:line 71

    2. If I open the Form as dialog: Form.ShowDialog() I can get info and set FadeIn/Out.Length without an error but actual changes to the Event happen AFTER I close the form.

    Maybe there’re some compatibility issues between Vegas and VS versions?
    Thanks,
    Gregory

    1. Gregory, my advise would be to try using Form.ShowDialog(); but at the end of the “set FadeIn/Out.Length” routine, add:
      myVegas.UpdateUI();

      That will force the UI to update at that time. However, if you have a window you want to stay open all the time, I would recommend making a Custom Command instead. That’s what Custom Commands are designed to do – stay running all the time. A regular script will not let you interact with the timeline until it is finished. A custom command can stay running all the time.

Leave a Reply